You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -26,6 +31,9 @@ An example webhook to trigger a Bamboo job.
26
31
A request body can be specified as well.
27
32
28
33
{
34
+
"events": [{
35
+
"name": "contract_content_changed"
36
+
}],
29
37
"request": {
30
38
"method": "POST",
31
39
"url": "http://example.org/something",
@@ -37,6 +45,33 @@ A request body can be specified as well.
37
45
38
46
**BEWARE** The password can be reverse engineered from the database, so make a separate account for the Pact Broker to use, don't use your personal account!
39
47
48
+
#### Event types
49
+
50
+
`contract_content_changed:` triggered when the content of the contract has changed since the previous publication. Uses plain string equality, so changes to the ordering of hash keys, or whitespace changes will trigger this webhook.
51
+
52
+
`provider_verification_published:` triggered whenever a provider publishes a verification.
53
+
54
+
### Dynamic variable substitution
55
+
56
+
The following variables may be used in the request parameters or body, and will be replaced with their appropriate values at runtime.
57
+
58
+
`${pactbroker.pactUrl}`: the "permalink" URL to the newly published pact (the URL specifying the consumer version URL, rather than the "/latest" format.)
59
+
60
+
Example usage:
61
+
62
+
{
63
+
"events": [{
64
+
"name": "contract_content_changed"
65
+
}],
66
+
"request": {
67
+
"method": "POST",
68
+
"url": "http://example.org/something",
69
+
"body": {
70
+
"thisPactWasPublished" : "${pactbroker.pactUrl}"
71
+
}
72
+
}
73
+
}
74
+
40
75
### Testing
41
76
42
77
To test a webhook, navigate to the webhook in the HAL browser, then make a POST request to the "execute" relation. The response or error will be shown in the window.
0 commit comments