cloud-builders icon indicating copy to clipboard operation
cloud-builders copied to clipboard

Google Cloud Build - Github App doesn't run builds when users raise PR's from personal fork

Open kbarber opened this issue 8 years ago • 19 comments

I've noticed that when our users raise a PR from their own personal forks of a repo using GCB and Github App Google Cloud doesn't run tests. This of course works fine when users raise a PR based on the origin, tests run fine.

This only happens for private repositories in particular.

Even when users have configured the Github App integration on their own private clone, this still doesn't seem to work.

For example this fails silently:

  • the repo is github.com/mycompany/myrepo
  • A user forks this to github.com/someuser/myrepo
  • User creates a branch in github.com/someuser/myrepo
  • Raises a PR against github.com/mycompany/myrepo against master branch

I've tried all sorts of combinations but alas, the tests just don't run, Github simply shows no builds and GCB also shows no builds as if the PR was ignored.

This example works fine of course:

  • the repo is github.com/mycompany/myrepo
  • User creates a branch in github.com/mycompany/myrepo
  • User raises a PR against github.com/mycompany/myrepo for master branch

I'm kind of lost here, and not sure if this is just not supported or is something odd. Should this work, is it a non-feature perhaps? Or is there something I am perhaps doing wrong?

Note like I said, this only happens for private repos and their forks. Public repos are fine.

kbarber avatar Oct 12 '18 22:10 kbarber

Supporting pull requests from personal forks is a highly requested feature and is on our roadmap. We are dogfooding this internally and hope to release it soon.

car409 avatar Oct 15 '18 13:10 car409

@car409 thanks very much, can I track the feature somewhere?

kbarber avatar Oct 16 '18 12:10 kbarber

Any updates on this?

eddiemonge avatar Nov 27 '18 20:11 eddiemonge

+1 . I ran into this today too. Any updates on status?

quinton-hoole avatar Nov 30 '18 00:11 quinton-hoole

Work is still in progress and part of a larger effort to improve handling of GitHub PR triggers. We're hoping to launch support for this in early 2019.

christophersanson avatar Nov 30 '18 22:11 christophersanson

Thanks for the update @christophersanson . We can now plan accordingly.

quinton-hoole avatar Dec 01 '18 00:12 quinton-hoole

Voicing support for this as well. This was kind of advertised as already possible in the documentation here

"Note: The steps in this tutorial use a public GitHub repository, but you can use the Google Cloud Build app with private repositories as well."

jgrabenstein avatar Dec 11 '18 23:12 jgrabenstein

@jgrabenstein it does work with private repos. That's not what this issue is for. The issue here is building PRs that are sent from a different repo. PR builds from the same repo work, for both public and private repos. They don't work when they come from a different repo. That documentation doesn't say anything about forked repo PRs

eddiemonge avatar Dec 12 '18 19:12 eddiemonge

@eddiemonge Fair point, it was a poor assumption on my end.

jgrabenstein avatar Dec 12 '18 19:12 jgrabenstein

Any update on this @christophersanson ? Are you still on target for early 2019? Any advice much appreciated.

quinton-hoole avatar Jan 16 '19 02:01 quinton-hoole

Sorry, I'm confused --- OP said that this issue only exists for private repos (if we're talking about a public repo + public fork, PRs from the fork to the original (public) repo do trigger a build). But the comment by @eddiemonge seems to be a contradiction. Does the Github App currently support triggering on PRs from forks in public repos?

listx avatar Feb 21 '19 00:02 listx

Org Private repo -> fork to personal private repo -> Submit PR from the personal repo to the Org repo does not trigger builds.

eddiemonge avatar Feb 21 '19 00:02 eddiemonge

@christophersanson @car409 Any update on this? It was reported as being dogfooded in mid October, to be released soon. Then to be released in early 2019. Are we close yet?

quinton-hoole avatar Feb 22 '19 21:02 quinton-hoole

Any update?

wesleywillians avatar Mar 28 '19 03:03 wesleywillians

HI all,

This is working as part of our GitHub App Triggers alpha. We have added new functionality that allows you to create tGitHub App based triggers based on branch, tag, or pull request changes. The pull request triggers now work with forked Prs. You can sign up for it here

Once you are whitelisted more details on the features can be found on this page

prabenzom avatar Mar 28 '19 19:03 prabenzom

I've signed up a while back (a week+?) but haven't heard anything. Not even sure if my submission has successfully gone through to someone somewhere. Is this still actively being worked on?

mvpmvh avatar Apr 18 '19 19:04 mvpmvh

@prabenzom Where do I open an issue for that?

If I create a trigger for any branch then 2 builds for local branches are run, the default GitHub checks and the trigger. Only the trigger will run for forked branches. There doesn't seem to be a way to say to only run for forked or local. The only work around is checking the box that says to enter the comment to make it run, which is a manual step I would like to not take

eddiemonge avatar Apr 18 '19 20:04 eddiemonge

@prabenzom Where do I open an issue for that?

https://issuetracker.google.com/issues/new?component=190802&template=1162743

imjasonh avatar Apr 18 '19 20:04 imjasonh

This GitHub issue tracker is intended for bugs with the officially supported builder images specifically. Please report issues and feature requests regarding the GCB service to our public issue tracker at https://issuetracker.google.com/issues/new?component=190802&template=1162743

bendory avatar Jun 14 '19 18:06 bendory