github-tools / github-tools/github

Issues with protected branches: Github is confusing Pull Requests review and push protection

未关闭
#473 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
主要语言
JavaScript
星标
3.8k
派生
809
PR 合并指标
30 天内没有已合并 PR

描述

As a Github user, i want to request review for Pull Requests, but, i want to able push on branch.

Setup:
1) Create a branch
2) Protect it, asking review for Pull Requests
3) Do not protect push

Expected Behaviour:
1) Pull Requests require review
2) Push is open on following branch

Actual Scenario:
1) Pull Requests is requiring reviews
2) Got following error while pushing:

```
ramon@Ramons-Mac-mini:~/GIT/SAT-ROBOT (master)$ git push robot master
Counting objects: 2, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (2/2), done.
Writing objects: 100% (2/2), 295 bytes | 0 bytes/s, done.
Total 2 (delta 1), reused 0 (delta 0)
remote: Resolving deltas: 100% (1/1), completed with 1 local object.
remote: error: GH006: Protected branch update failed for refs/heads/master.
remote: error: At least one approved review is required by reviewers with write access.
To https://github.com/SymphonyOSF/SAT-Robot.git
! [remote rejected] master -> master (protected branch hook declined)
error: failed to push some refs to 'https://github.com/SymphonyOSF/SAT-Robot.git'
```

贡献指南

这个仓库没有索引到贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。