Repository navigation
XCL-196 残った Cloudflare の Preview を見つけて消す (kit 側: マージ後のブランチの削除を設定で切る) - #10
Merged
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.
概要
利用側で、CI が PR の後片付けを済ませてから head のブランチを消す形にできるよう、GitHub の「マージの後にブランチを消す」(
delete_branch_on_merge) を、ブランチ保護の設定ファイルで切れるようにする。今は常に true にしている。変更内容
apply.mjs: 設定ファイルにdelete_branch_on_merge(真偽値、省略時は true) を足し、リポジトリの設定のPATCHに反映する。真偽値でないと、何も送らずに止まるSKILL.md・docs/SETUP.md§5・templates/.github/branch-protection.jsonに書く (false にする例: CI が後片付けの後にブランチを消す)--dry-runの出力、文字列"false"で形のエラー)キーの名前は、既存のキーと GitHub API に揃えて snake_case にした。
受け入れ条件
delete_branch_on_merge(真偽値、省略時は true) を足し、リポジトリの設定に反映するSKILL.md、templates/.github/branch-protection.jsonの説明、docs/SETUP.md§5 に書く。false にする理由の例を 1 行scripts/ci/branch-protection.test.mjs) を足す動作確認
node --test 'scripts/ci/*.test.mjs' 'ops/linear-janitor/*.test.mjs' 'ops/manager-precheck/*.test.mjs'(117 件すべて通過)docker run --rm -v "$PWD:/repo" -w /repo rhysd/actionlint:1.7.12 -ignore 'workflow_(repository|sha)'(指摘なし)リスクの確認
.env*、キー、トークン) を含めていない人が確認すること