Skip to content
This repository has been archived by the owner on Jan 11, 2018. It is now read-only.

Integrity GitHub hook is incompatible with multiple projects #90

Open
jamesarosen opened this issue Oct 26, 2010 · 9 comments
Open

Integrity GitHub hook is incompatible with multiple projects #90

jamesarosen opened this issue Oct 26, 2010 · 9 comments

Comments

@jamesarosen
Copy link

We have several projects listed in our Integrity app. We have a GitHub post-receive hook set up to notify after a push to each one. Unfortunately, every time Integrity received the POST from GitHub, it tries to build every project with the commit hash it received from GitHub. This breaks all builds except for the one that actually got the push.

@jamesarosen
Copy link
Author

This seems to be happening because one of our projects ("foo") has a name that's a prefix of some of our other projects ("foo_core", "foo_forms", "foo_bar"). The matcher seems to be insufficiently specific.

@jamesarosen
Copy link
Author

The solution might be as simple as removing the "%" from ProjectFinder#all

@grahamc
Copy link
Contributor

grahamc commented Jul 14, 2011

Thank you for reporting this - I haven't used Integrity in that particular use case, but I will see about setting up a couple of repos to see how it reacts.

Thank you!
Graham Christensen

@JDutil
Copy link
Contributor

JDutil commented Feb 28, 2012

I have a similar setup with multiple projects using the same prefix. I use the /github/:api_token hook since I was unable to properly authenticate the project specific hook, and it is working properly for me.

When using the project specific /:project/builds hook this may still be an issue though I was unable to test that setup.

@rud
Copy link
Contributor

rud commented Jan 14, 2015

So commit 5773fa8 looks like it would fix this. What are the chances of having that merged in?

@p
Copy link
Member

p commented Jan 16, 2015

@rud according to a comment above, "the matcher is insufficiently specific". The fix then should make the matcher more specific?

@rud
Copy link
Contributor

rud commented Jan 16, 2015

It used to be a wildcard, but that means it'll match too much. The commit 5773fa8 fixes the issue as reported. Currently a "LIKE" query is used, with the fix it just uses an exact match.

@p
Copy link
Member

p commented Jan 17, 2015

If you make a pull request with these two changes:

  1. Change %W{#{@repo.uri} #{@repo.uri}.git} to [@repo.uri, "#{@repo.uri}.git"]
  2. Add test coverage

I will be more than happy to merge it. Thanks!

@rud
Copy link
Contributor

rud commented Feb 19, 2015

I don't expect to be contributing a PR for this as I've picked a different CI solution for the project. In other words, this is up for grabs for anyone wanting to help out with a simple pull-request.

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

No branches or pull requests

5 participants