pandeiro245 / shukan

0 stars 0 forks source link

mainブランチへの直接pushを禁止する #37

Closed pandeiro245 closed 3 years ago

pandeiro245 commented 3 years ago

image

この状態だとpushできちゃう

https://github.com/pandeiro245/shukan/commit/dc0e88ae4ea0feeeff276e42abb705573f59ee2f

pandeiro245 commented 3 years ago
nishiko:~/environment (main) $ git push
Enumerating objects: 5, done.
Counting objects: 100% (5/5), done.
Delta compression using up to 2 threads
Compressing objects: 100% (3/3), done.
Writing objects: 100% (3/3), 317 bytes | 317.00 KiB/s, done.
Total 3 (delta 2), reused 0 (delta 0)
remote: Resolving deltas: 100% (2/2), completed with 2 local objects.
remote: error: GH006: Protected branch update failed for refs/heads/main.
remote: error: At least 1 approving review is required by reviewers with write access.
To github.com:pandeiro245/shukan.git
 ! [remote rejected] main -> main (protected branch hook declined)
error: failed to push some refs to 'git@github.com:pandeiro245/shukan.git'

image

これでいけた