'Why is the Approve button disabled in GitHub "pull request review"?
Problem Background:
So far I am the sole owner of a GitHub repo. I committed the code from my system to a branch called release (actually its a tag based on develop branch, if that matters). In GitHub, I created a pull request where base branch is master and compare branch is release.
But I am only allowed to comment on review, not allowed to approve. What may be the reason?
Note: There is no merge conflicts and while creating the pull request the green signal of merging possible was displayed.
Here is how the master branch is protected by me:
Solution 1:[1]
If you were the one who has committed the pull request you cannot approve or request changes on this pull request. It's only available when someone else requested such action.
So your only option is to comment it.
Solution 2:[2]
I am the only developer in my github profile. I am admin of the project. Yet I am not authorized to approve my own PR. I do see an option to merge using admin Priviledges.
Solution 3:[3]
Looks like workaround until github adds BE validation :) But just open DevTools in your browser and remove disabled
prop from the 'approve' radio button input. Works for me.
Solution 4:[4]
for me, the only option was disabling it.
disable Require pull request reviews before merging under settings > branches > the branch
I am the only developer of my project, so maybe I cant review my own pull request. I make a pr, then merge it if tests pass....I know my answer doesn't answer the question exactly, but none of the fixes above worked....
Solution 5:[5]
I have faced the same issue today and managed to resolve it.
The problem occurs only when the Branch protection rule for the branch into which you are trying to put the code into has the following setting enabled: Include administrators
The definition of this setting is: Enforces all configured restrictions above for administrators.
Disable this setting and it will allow you as the sole owner to accept your own pull request.
Solution 6:[6]
I was facing the same issue, I was able to merge branch by just resolving all the conflicts between them.
Before Resolving the conflict there was a error message something like not able to merge automatically but you can create a pull request.
then I deleted that pull request and after resolving all conflicts created pull request again and there was a message "Able to merge"
Solution 7:[7]
I ran into this issue as well, but I was able to resolve it by assigning the Pull request to myself. This allowed me to review and merge my own pull request with the main branch.
Solution 8:[8]
I had the same issue and here's how I solved it:
- The issue showed up when I went to: "my-repo" > "my-branch" > "pull requests" > select my pull request > "files changed" tab > "review changes" button on the right > "Approved" was disabled.
- I solved it by going to "my-repo" > "my-branch" > "pull requests" > select my pull request > scroll down to the "Merge Pull Request" button and clicked it.
I didn't have to change any permissions.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | Number16BusShelter |
Solution 2 | Aseem |
Solution 3 | TarĂ¡s |
Solution 4 | |
Solution 5 | variable |
Solution 6 | |
Solution 7 | sdk2020 |
Solution 8 | Adam |