From 8a26a17a0f831fb28a2cf6be57417c5ac5defc0a Mon Sep 17 00:00:00 2001 From: Jinbeom Choi Date: Mon, 7 Sep 2026 12:31:25 +0900 Subject: [PATCH] gitlint: Add rebase hint for older non-compliant commits The failure hint only suggests `git commit --amend`, which can rewrite the most recent commit. When an older commit on the branch violates the rules, that command does not reach it and contributors are left without a usable next step. Add an interactive rebase hint next to the amend hint, and point it at the same base branch the check compares against, so the range offered for rewriting matches the range gitlint verified. Closes #3057 --- .github/actions/gitlint/action.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/actions/gitlint/action.yml b/.github/actions/gitlint/action.yml index 418c504e4e6..8eb894afcaa 100644 --- a/.github/actions/gitlint/action.yml +++ b/.github/actions/gitlint/action.yml @@ -34,9 +34,12 @@ runs: if ! gitlint --commits origin/${{ inputs.base-branch }}..HEAD; then \ echo -e "\nWARNING: Your commit message does not follow the required format." && \ echo "Formatting rules: https://eclipse-score.github.io/score/main/contribute/general/git.html" && \ - echo -e "To fix your commit message, run:\n" && \ + echo -e "\nIf only the most recent commit is affected, run:\n" && \ echo " git commit --amend" && \ - echo "Then update your commit (fix gitlint warnings). Finally, force-push:" && \ + echo -e "\nIf an older commit is affected, start an interactive rebase and" && \ + echo -e "change 'pick' to 'reword' for every commit reported above:\n" && \ + echo " git rebase -i origin/${{ inputs.base-branch }}" && \ + echo -e "\nAfter updating the commit messages, force-push:\n" && \ echo " git push --force-with-lease" && \ exit 1; \ fi