-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Error 500 attempting to merge PR as admin #9739
Comments
Lines 143 to 144 in 80bfd51
The specific override would have to go here or the line below. |
@davidsvantesson you did not understand that the hook always runs. Lines 101 to 102 in 80bfd51
This is not true. In fact if you have the protectedbranchid set it's not a manual merge!! |
Ohh. Is there any way to know if it was done from the UI? |
The previous code didn't even check if status checks was ok, so it didn't prevent admins (or anyone) to merge. @zeripath So we never allow manual merges, unless user has push rights to branch? (I.e. a user with merge rights has to use the UI or API, not trying to manual merge and push). It is a bit hard to follow the code when it makes internal requests 😕 😊 In that case this code might even be a bit double as the check is done before merge is done. Anyhow it should be an easy fix to just check if user is admin. |
Description
When I attempt to merge a PR that doesn't have enough approvals, the
[Merge]
button shows up in red and the message "As an administrator, you may still merge this pull request" is displayed. However, when I push the[Merge]
button, a500 Server Error
page shows up with the following error:Stack trace:
User
39
is the owner of the repository and the user I'm logged in for the merge operation.The text was updated successfully, but these errors were encountered: