Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Integrity GitHub hook is incompatible with multiple projects #90

Open
jamesarosen opened this Issue · 9 comments

5 participants

@jamesarosen

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

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

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

@grahamc
Owner

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

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

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

@p
Collaborator
p commented

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

@rud

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
Collaborator
p commented

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

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 join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.