beet-aizu / library

Competitive Programming Library
https://beet-aizu.github.io/library/
128 stars 23 forks source link

CI を直す #114

Open beet-aizu opened 1 year ago

beet-aizu commented 1 year ago

github actions からの自動 push と protected branch の相性が悪すぎる

beet-aizu commented 1 year ago

@ei1333 @Luzhiled https://github.com/luzhiled1333/comp-library ってどうしてますか

beet-aizu commented 1 year ago
INFO:onlinejudge_verify.main:$ git add .verify-helper/timestamps.remote.json && git commit && git push
[master 0ed9221b] [auto-verifier] verify commit 292eaddb2789d3429032b9843aa9e05028783005
 1 file changed, 2 insertions(+), 2 deletions(-)
remote: Resolving deltas:   0% (0/3)        
remote: Resolving deltas:  33% (1/3)        
remote: Resolving deltas:  66% (2/3)        
remote: Resolving deltas: 100% (3/3)        
remote: Resolving deltas: 100% (3/3), completed with 3 local objects.        
remote: error: GH006: Protected branch update failed for refs/heads/master.        
remote: error: Changes must be made through a pull request. Required status check "build" is expected.        
To https://github.com/beet-aizu/library.git
 ! [remote rejected]   HEAD -> master (protected branch hook declined)
error: failed to push some refs to 'https://github.com/beet-aizu/library.git'
Traceback (most recent call last):
  File "/opt/hostedtoolcache/Python/3.11.3/x64/bin/oj-verify", line 8, in <module>
    sys.exit(main())

https://github.com/beet-aizu/library/actions/runs/4881444691/jobs/8718638237#step:5:1416

Luzhiled commented 1 year ago

魔改造して自動 push をやめました https://github.com/luzhiled1333/verification-helper

beet-aizu commented 1 year ago

魔改造して自動 push をやめました https://github.com/luzhiled1333/verification-helper

https://github.com/luzhiled1333/comp-library/commit/c89b1871add5f5aa1398e01cdd3b6954bf98ac0f ?

Luzhiled commented 1 year ago

最終的に、 main を保護するのは現状の verification-helper では無理だという結論に至って、PR では check のみを、merge するときは諦めて push させるということをしていますね

beet-aizu commented 1 year ago

https://github.com/luzhiled1333/comp-library/blob/c89b1871add5f5aa1398e01cdd3b6954bf98ac0f/.github/workflows/verify.yml#L12-L13 これか?

beet-aizu commented 1 year ago

最終的に、 main を保護するのは現状の verification-helper では無理だという結論に至って、PR では check のみを、merge するときは諦めて push させるということをしていますね

なんか一応 protect はされてそうな雰囲気を感じます

スクリーンショット 2023-05-05 1 53 59

https://github.com/luzhiled1333/comp-library/pull/125

Luzhiled commented 1 year ago

ほんとだ

見てみたら Require status checks to pass before merging だけにチェック入ってました

Luzhiled commented 1 year ago

一応カスの issue と PR を置いておきます https://github.com/luzhiled1333/comp-library/issues/64 https://github.com/luzhiled1333/comp-library/pull/69

beet-aizu commented 1 year ago

https://github.com/beet-aizu/library/actions/runs/4885284397/jobs/8719149640 が通って ば な な になっていたが、よく考えると timestamp.remote.json と コミットのタイミング がいい感じになることがわかる

beet-aizu commented 1 year ago

自分 procrastinating よろしいか?いいよ

beet-aizu commented 1 year ago

https://github.com/luzhiled1333/comp-library/blob/c89b1871add5f5aa1398e01cdd3b6954bf98ac0f/.github/workflows/verify.yml#L12-L13 これか?

https://github.com/beet-aizu/library/actions/runs/4894584151/jobs/8738998783#step:5:751 うーん

beet-aizu commented 1 year ago

Require a pull request before merging のチェックを外してみる

beet-aizu commented 1 year ago

https://github.com/beet-aizu/library/actions/runs/4894584151/jobs/8739095103#step:5:750 ダメ