Why is the Approve button disabled in GitHub “pull request review”?

不羁的心 提交于 2020-03-16 03:47:11

问题


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:


回答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.




回答2:


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.



来源:https://stackoverflow.com/questions/50436095/why-is-the-approve-button-disabled-in-github-pull-request-review

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!