Google Cloud Build - Github App doesn't run builds when users raise PR's from personal fork
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.
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 thanks very much, can I track the feature somewhere?
Any updates on this?
+1 . I ran into this today too. Any updates on status?
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.
Thanks for the update @christophersanson . We can now plan accordingly.
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 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 Fair point, it was a poor assumption on my end.
Any update on this @christophersanson ? Are you still on target for early 2019? Any advice much appreciated.
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?
Org Private repo -> fork to personal private repo -> Submit PR from the personal repo to the Org repo does not trigger builds.
@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?
Any update?
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
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?
@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
@prabenzom Where do I open an issue for that?
https://issuetracker.google.com/issues/new?component=190802&template=1162743
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