Skip to content

Commit

Permalink
feat(wip): keep pacts as WIP when verified via the pactUrl passed tho…
Browse files Browse the repository at this point in the history
…ugh the webhook template parameters - experimental.

To enable this feature set env var PACT_BROKER_FEATURES=experimental_webhook_wip
  • Loading branch information
bethesque committed Nov 24, 2020
1 parent 8eefba5 commit a9b3fef
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/pact_broker/pacts/metadata.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
require 'pact_broker/feature_toggle'

module PactBroker
module Pacts
module Metadata
Expand Down Expand Up @@ -27,10 +29,12 @@ def build_metadata_for_latest_pact(pact, selection_parameters)
# parameters. This is part of ensuring that verification results webhooks
# go back to the correct consumer version number (eg for git statuses)
def build_metadata_for_webhook_triggered_by_pact_publication(pact)
{
metadata = {
consumer_version_number: pact.consumer_version_number,
consumer_version_tags: pact.consumer_version_tag_names
}
metadata[:wip] = "true" if PactBroker.feature_enabled?(:experimental_webhook_wip)
metadata
end
end
end
Expand Down

0 comments on commit a9b3fef

Please sign in to comment.