ci: adopt shared back-merge workflow - #48
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.
What
リリース後に
developをmasterへ追従させる Back-merge ワークフローを追加します。実体は共有の再利用ワークフロー qtmleap/actions にあり、
このリポジトリには 15 行の呼び出し側だけを置きます。
Why
feature → develop → masterフローでは、リリースをマージコミットで行うため直後はmasterだけが 1 コミット先行し、
developは放置すると毎リリース 1 回ずつ取り残されます。masterをdevelopへ fast-forward push することでこれを解消します。リリース直後のmasterはmerge(master_prev, develop_head)なのでdevelopは必ずmasterの祖先であり、push は常に fast-forward になります。back-merge PR 方式と違ってマージコミットが 1 つも
増えません。
安全策
git merge-base --is-ancestorを確認し、fast-forward できない場合はpush せず警告して正常終了します (従来どおり手動で back-merge PR を作る運用に落ちる)
--forceは使いませんTest plan
workflow_dispatchを手動実行して配線を確認します。現時点ではdevelopがmasterより進んでいるため「fast-forward 不可」の警告で終わるのが正しい挙動です
git rev-parse origin/develop origin/masterが同一SHA になることを確認します
🤖 Generated with Claude Code