feat(config): require a pull request on every declared repository - #139
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
背景
require_pull_requestを宣言に加えたとき(#138)、latex-environmentとtenbin_cacheだけ無効だったので現状を写して「揃えるかは未決」としていた。揃える判断になったので反映する。これらは
enforce_admins: falseと組み合わさって、管理者が main へ直接 push できる状態だった。適用前に確認したこと
有効化は push を止める操作なので、止まって困るものが無いかを先に調べた。
1. main へ push する自動化は無い
latex-environmentの workflow が push しているのは feature ブランチ(check-texlive-updates.yml)とreleaseブランチ(update-release-branch.yml)、それに不要ブランチの削除(branch-cleanup.yml)だけ。tenbin_cacheには push する workflow が無い。2. 実際の運用は既に PR 経由
両リポジトリとも main の直近 15 commit がすべて PR に紐づいていた。直接 push の実績は無い。
つまりこの変更は運用の明文化であり、やり方を変えるものではない。
変更内容
宣言の 2 箇所を
trueにし、invariantsの記述を「未決」から「true 固定」に改めた。適用と検証
修正済みの
apply-repo-protection.shを実際に使って是正した。宣言 → 監査で drift 検出 → apply → 監査で一致、の一巡が動くことの確認でもある。11 リポジトリすべてが
PR必須=true / approvals=0 / admins=falseに揃った(strictのみ系統差)。全項目置換の PUT を 11 リポジトリに投げているので、巻き添えが無いことも確認した。contexts /
dismiss_stale_reviews/restrictions/allow_force_pushes/ マージ設定はいずれも変化なし(#138 でrequired_pull_request_reviewsを宣言から組み立てるようにしたため、以前のように保護が落ちることも無い)。ref: smkwlab/latex-ecosystem#169