@@ -118,10 +118,11 @@ def update_pact params, existing_pact
118
118
logger . debug "Content #{ params [ :json_content ] } "
119
119
updated_pact = pact_repository . update existing_pact . id , params
120
120
121
+ webhook_service . trigger_webhooks updated_pact , nil , PactBroker ::Webhooks ::WebhookEvent ::CONTRACT_PUBLISHED
121
122
if existing_pact . json_content != updated_pact . json_content
122
123
webhook_service . trigger_webhooks updated_pact , nil , PactBroker ::Webhooks ::WebhookEvent ::CONTRACT_CONTENT_CHANGED
123
124
else
124
- logger . debug "Pact has not changed since previous revision , not triggering webhooks"
125
+ logger . debug "Pact has not changed since previous version , not triggering webhooks for changed content "
125
126
end
126
127
127
128
updated_pact
@@ -137,10 +138,11 @@ def create_pact params, version, provider
137
138
138
139
def trigger_webhooks pact
139
140
# TODO add tests for this
141
+ webhook_service . trigger_webhooks pact , nil , PactBroker ::Webhooks ::WebhookEvent ::CONTRACT_PUBLISHED
140
142
if pact_is_new_or_pact_has_changed_since_previous_version? ( pact )
141
143
webhook_service . trigger_webhooks pact , nil , PactBroker ::Webhooks ::WebhookEvent ::CONTRACT_CONTENT_CHANGED
142
144
else
143
- logger . debug "Pact has not changed since previous version, not triggering webhooks"
145
+ logger . debug "Pact has not changed since previous version, not triggering webhooks for changed content "
144
146
end
145
147
end
146
148
0 commit comments