Repository navigation
XCL-199 agent-dev-kit に、後片付けの後でマージ済みのブランチを消すアクションを足す - #11
Merged
Merged
Conversation
11 of 12 tasks
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.
概要
マージ後の後片付け (Preview の削除など) が済んでから head のブランチを消し、後片付けに失敗したらブランチが残って気づけるようにする。ブランチ保護のスキルの
delete_branch_on_merge: falseと対になる部品。変更内容
actions/delete-merged-branch/(composite) を追加。入力はprotected-branches(既定develop main) とtoken(既定github.token)。スクリプトはgithub.action_pathから辿るので、呼ぶ側の checkout は要らないscripts/ci/delete-merged-branch.mjs: 消すかの判定 (マージ済み・守るブランチ・fork) と、gh api -X DELETEの結果の扱い (Reference does not existは成功、それ以外は失敗)。テストを付けたdocs/SETUP.md§5 に使い方とcontents: writeが要ることを、README の表にアクションを足した受け入れ条件
actions/delete-merged-branch/(composite) があるprotected-branches、既定develop main)、fork の PR のブランチは消さないscripts/ci/delete-merged-branch.mjs)、テストを付けるcontents: writeが要ることと使い方をdocs/SETUP.md§5 (delete_branch_on_merge の説明のそば) に書き、README の表に足す動作確認
node --test 'scripts/ci/*.test.mjs' 'ops/linear-janitor/*.test.mjs' 'ops/manager-precheck/*.test.mjs'(128 件すべて成功)docker run --rm -v "$PWD:/repo" -w /repo rhysd/actionlint:1.7.12 -ignore 'workflow_(repository|sha)'(指摘なし)リスクの確認
.env*、キー、トークン) を含めていない人が確認すること
pull_request(closed) で、ブランチが消えることは未確認 (API の削除はテストでは差し替えている)補足