Skip to content
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

Provide a diff endpoint for comparing two arbitrary versions of a Pact #190

Closed
jubobs opened this issue Feb 15, 2018 · 5 comments
Closed

Comments

@jubobs
Copy link

jubobs commented Feb 15, 2018

Similar to the existing previous-distinct endpoint, but allowing arbitrary versions of a Pact to be diff'ed.

This would come in particularly handy for us, where we want to send—as part of our CI/CD pipeline—Slack notifications to the provider team if a consumer team pushes a new version of the pact that is different from latest/prod.

The endpoint URI to get the diff between <version_a> and <version_b> could be something like

pacts/provider/<provider>/consumer/<consumer>/version/<version_a>/diff/<version_b>

Ideally,

pacts/provider/<provider>/consumer/<consumer>/latest/<tag>/diff/<some_version>

would also be available.

@bethesque
Copy link
Member

I've always had this in the back of my mind to do, but you're the first person to actually ask for it. It should be quite easy. I can't get on to it right now because I've sworn not to do any more broker code until pact message is done, but I'll get on to it as soon as I can. Happy to accept PRs if you're interested.

@mefellows
Copy link
Member

Love this idea!

@jubobs
Copy link
Author

jubobs commented Feb 22, 2018

@bethesque Great to hear! 😃

Happy to accept PRs if you're interested.

I've never used Ruby in anger; I can't promise anything, but I can give it a shot.

@bethesque
Copy link
Member

I've thrown together some developer docs that should help https://github.com/pact-foundation/pact_broker/blob/master/CONTRIBUTING.md

@bethesque
Copy link
Member

bethesque commented Jul 8, 2018

This is done. See the pb:diff relation in the latest version of the pact broker, and its HAL related documentation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants