-
-
Notifications
You must be signed in to change notification settings - Fork 174
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: set missing provider branch name parameter for contract_requirin…
…g_verification_published webhooks
- Loading branch information
Showing
9 changed files
with
187 additions
and
47 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
require "pact_broker/pacts/selector" | ||
require "pact_broker/hash_refinements" | ||
|
||
module PactBroker | ||
module Versions | ||
class Selector < PactBroker::Pacts::Selector | ||
def resolve_for_branch(consumer_version, resolved_branch_name) | ||
# Need to rename branch to branch_name | ||
ResolvedSelector.new(self.to_h.merge({ resolved_branch_name: resolved_branch_name }.compact), consumer_version) | ||
end | ||
end | ||
|
||
class ResolvedSelector < PactBroker::Pacts::ResolvedSelector | ||
using PactBroker::HashRefinements | ||
|
||
PROPERTY_NAMES = PactBroker::Pacts::Selector::PROPERTY_NAMES + [:version, :resolved_branch_name] | ||
|
||
def initialize(properties = {}, version) | ||
properties.without(*PROPERTY_NAMES).tap { |it| warn("WARN: Unsupported property for #{self.class.name}: #{it.keys.join(", ")} at #{caller[0..3]}") if it.any? } | ||
merge!(properties.merge(version: version)) | ||
end | ||
|
||
def resolved_branch_name | ||
self[:resolved_branch_name] | ||
end | ||
|
||
def version | ||
self[:version] | ||
end | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
require "pact_broker/pacts/selector" | ||
require "pact_broker/versions/selector" | ||
|
||
module PactBroker | ||
module Versions | ||
class Selectors < Array | ||
def initialize *selectors | ||
super([*selectors].flatten) | ||
end | ||
|
||
def + other | ||
Selectors.new(super) | ||
end | ||
|
||
def sort | ||
Selectors.new(super) | ||
end | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.