Skip to content

Conversation

@ttretau
Copy link
Contributor

@ttretau ttretau commented Jul 24, 2023

what

Fix #2601 by using the owner of PRs head in the Github API status check.

why

As described in #2601, currently the status check fails on forked repo PRs (with a 404) due to using the repo owner, which will only work on Github PRs on the same repo. This change will make it also work in case of a forked repo.

tests

  • Adapted unit tests.
  • Running the patched version in integration and production Atlantis instance successfully.

references

closes #2601

ttretau and others added 3 commits May 25, 2023 10:43
While using a PR from a fork and the "Github allow mergeable bypass apply" flag, the mergeable checks were run with the wrong owner in the request, leading to 404. By choosing the owner from the head repo data it should work both, for fork PRs and in-repo PRs.
@ttretau ttretau requested a review from a team as a code owner July 24, 2023 14:29
@github-actions github-actions bot added go Pull requests that update Go code provider/github labels Jul 24, 2023
@GenPage GenPage enabled auto-merge (squash) August 1, 2023 01:56
@GenPage GenPage merged commit 6227195 into runatlantis:main Aug 1, 2023
ijames-gc pushed a commit to gocardless/atlantis that referenced this pull request Feb 13, 2024
While using a PR from a fork and the "Github allow mergeable bypass apply" flag, the mergeable checks were run with the wrong owner in the request, leading to 404. By choosing the owner from the head repo data it should work both, for fork PRs and in-repo PRs.

Co-authored-by: Dylan Page <[email protected]>
ijames-gc pushed a commit to gocardless/atlantis that referenced this pull request Feb 13, 2024
While using a PR from a fork and the "Github allow mergeable bypass apply" flag, the mergeable checks were run with the wrong owner in the request, leading to 404. By choosing the owner from the head repo data it should work both, for fork PRs and in-repo PRs.

Co-authored-by: Dylan Page <[email protected]>
terakoya76 pushed a commit to terakoya76/atlantis that referenced this pull request Dec 31, 2024
While using a PR from a fork and the "Github allow mergeable bypass apply" flag, the mergeable checks were run with the wrong owner in the request, leading to 404. By choosing the owner from the head repo data it should work both, for fork PRs and in-repo PRs.

Co-authored-by: Dylan Page <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

go Pull requests that update Go code provider/github

Projects

None yet

Development

Successfully merging this pull request may close these issues.

"GitHub Allow Mergable Bypass Apply" Broken for Fork PRs

2 participants