-
-
Notifications
You must be signed in to change notification settings - Fork 180
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add provider pacts by branch endpoints #728
base: master
Are you sure you want to change the base?
Conversation
uses latest-provider-pacts-with-branch relies on pact-foundation/pact_broker#728
lib/pact_broker/pacts/service.rb
Outdated
@@ -95,6 +95,10 @@ def find_latest_pacts_for_provider provider_name, options = {} | |||
pact_repository.find_latest_pacts_for_provider provider_name, options[:tag] | |||
end | |||
|
|||
def find_latest_pacts_for_provider_for_branch provider_name, options = {} | |||
pact_repository.find_latest_pacts_for_provider provider_name, options[:branch] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this uses
I am not super well versed with the queries so correct me if I am wrong, but I think this is old way of querying?
https://docs.pact.io/blog/2021/07/04/why-we-are-getting-rid-of-tags
instead should we try to use logic based on the below method ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ahh very good spot, appreciate the cookie trail!
77826d3
to
35ba4d5
Compare
needs a few tests writing and hopefully good to go |
"pb:latest-branch-pact-version" => { href: base_url + "/pacts/provider/{provider}/consumer/{consumer}/branch/{branch}/latest", title: "Latest version of a pact for a given consumer, provider and consumer version branch", templated: false }, "pb:branch-pact-versions" => { href: base_url + "/pacts/provider/{provider}/consumer/{consumer}/branch/{branch}", title: "All versions of a pact for a given consumer, provider and consumer version branch", templated: false }, "pb:latest-provider-pacts-with-branch" => { href: base_url + "/pacts/provider/{provider}/branch/{branch}/latest", title: "Latest pacts for provider with the specified branch", templated: true }, "pb:provider-pacts-with-branch" => { href: base_url + "/pacts/provider/{provider}/branch/{branch}", title: "All pact versions for the provider with the specified consumer version branch", templated: true }
0aaad7c
to
2d8a2dd
Compare
Fixes #619
Provides the following GET routes
/pacts/provider/{provider}/branch/
/pacts/provider/{provider}/branch/latest
/pacts/provider/{provider}/branch/{branch}
/pacts/provider/{provider}/branch/{branch}/latest
/pacts/provider/{provider}/consumer/{consumer}/branch
/pacts/provider/{provider}/consumer/{consumer}/branch/latest
/pacts/provider/{provider}/consumer/{consumer}/branch/{branch}
/pacts/provider/{provider}/consumer/{consumer}/branch/{branch}/latest