-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
in 0.22.3+, auto-merge only works with admin
repo permissions
#3320
Comments
cc @tpolekhin |
admin
repo permissions
@tpolekhin @nitrocode We should probably revert the series of PRs as technically this constitutes a breaking change. I've confirmed that you cannot access the protection API endpoint unless your user has |
so should we revert and then maybe add a flag to enabled this? |
I have no hard feelings reverting this. UPDATE: |
@tpolekhin No worries. Unfortunately since this requires informing users about changing permissions, we have to be more careful about staging this change. We definitely can re-introduce it again but will need a more coordinated rollout that includes documentation and possibly a flag for backwards compatibility or holding it until a major release with announcing the breaking changes to permissions. |
@nitrocode @GenPage @jamengual just wanted to double check if my previous comment update didn't went unnoticed We still have getBranchProtection call in the code to get required status checks: atlantis/server/events/vcs/github_client.go Line 409 in fd1ce43
Fortunately this is only called if But I did not found any mentions regarding required permissions for this to work. So probably we need to add this do the documentation https://www.runatlantis.io/docs/server-configuration.html#gh-allow-mergeable-bypass-apply |
Thanks for the quick revert @GenPage 👍🏼 |
@tpolekhin Let's get another issues to track this and the documentation work needed. We should definitely have documentation updated to recommend We could also then clean up/deprecate flags as well to ease the transition for users when we re-introduce your changes. |
Reverts "fix(github): branch protection not supported (runatlantis#3276)" Reverts "fix: allow Require Linear History when selecting merge method (runatlantis#3211)" Closes runatlantis#3320
Reverts "fix(github): branch protection not supported (runatlantis#3276)" Reverts "fix: allow Require Linear History when selecting merge method (runatlantis#3211)" Closes runatlantis#3320
Community Note
Overview of the Issue
Auto-merge fails with user setup with personal access token and repo write permissions. This worked fine previously. (we were upgrading from 0.22.3 but I suspect it is introduced in 0.23.3 due to the conversation on a similar issue. #3268)
With our Atlantis user set up as per
The user has 'write' permissions on the Repository.
https://api.github.com/repos/OWNER/REPO/branches/BRANCH/protection
api endpoint.
Do the docs just need updating to reflect this? Is it desired that Atlantis must have repo 'admin' access?
Reproduction Steps
Logs
Environment details
Additional Context
A similar issue was handled here #3268 but the fix only covered a specific case.
The text was updated successfully, but these errors were encountered: