-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Clarify permissions needed for auto-merge (--pr-merge
)
#280
Comments
For example, before I realized I needed to grant
...as seen in this excerpt: [...]
time="2023-11-20T08:21:25Z" level=debug msg="Pull Request is mergeable" pull-request="https://github.com/my-org/my-repo/pull/16" repository=my-org/my-repo
time="2023-11-20T08:21:25Z" level=error msg="Repository update failed" error="failed to merge Pull Request https://github.com/my-org/my-repo/pull/16: failed to wait until Pull Request https://github.com/my-org/my-repo/pull/16 is mergeable: failed to retrieve the required status checks for branch master: GET https://api.github.com/repos/my-org/my-repo/branches/master/protection/required_status_checks: 403 Resource not accessible by integration []" repository=my-org/my-repo ...likely related to this issue: |
But now when I've granted "repo admin view" permissions, I instead get this error (which I've yet to find the permission for):
...as seen in this excerpt: time="2023-11-20T08:33:15Z" level=debug msg="Pull Request is mergeable" pull-request="https://github.com/my-org/my-repo/pull/3" repository=my-org/my-repo
time="2023-11-20T08:33:16Z" level=error msg="Repository update failed" error="failed to merge Pull Request https://github.com/my-org/my-repo/pull/3: failed to wait until Pull Request https://github.com/my-org/my-repo/pull/3 is mergeable: failed to retrieve combined status of Pull Request https://github.com/my-org/my-repo/pull/3 for ref 0e5f7f8ce0e2372dbf53ce955223e8ac2e5c4b73: GET https://api.github.com/repos/my-org/my-repo/commits/0e5f7f8ce0e2372dbf53ce955223e8ac2e5c4b73/status: 403 Resource not accessible by integration []" repository=my-org/my-repo |
--pr-merge
)
I solved this one by granting ...as outlined here (I finally found those docs): |
So far the permissions I've granted are:
|
...and now I'm at a place where it's failing with:
...as seen in this excerpt: time="2023-11-20T09:00:35Z" level=debug msg="Pull Request can be merged" pull-request="https://github.com/my-org/my-repo/pull/3" repository=my-org/my-repo
time="2023-11-20T09:00:37Z" level=error msg="Repository update failed" error="failed to merge Pull Request https://github.com/my-org/my-repo/pull/3: failed to merge Pull Request https://github.com/my-org/my-repo/pull/3: PUT https://api.github.com/repos/my-org/my-repo/pulls/3/merge: 405 Repository rule violations found\n\nAt least 1 approving review is required by reviewers with write access.\n\n []" repository=my-org/my-repo |
thanks for the detailed report. Indeed we need to do a better job at documenting the repository settings. |
That's amazing ideas! 😍 |
Hi,
Could we clarify the permissions needed for auto-merge (
--pr-merge
), as described here:I'm running it using a GitHub App myself, but I imagine the same permission model might apply to personal access tokens (PAT).
The text was updated successfully, but these errors were encountered: