From 116ce2d03bfeea41450f2023b12e7ab63584d76d Mon Sep 17 00:00:00 2001 From: Nicolae Dicu Date: Thu, 28 Aug 2025 12:24:34 +0300 Subject: [PATCH] gitlint: Use gitlint from score Track and use the same .gitlint settings as in score repo. Signed-off-by: Nicolae Dicu --- .github/actions/gitlint/action.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/actions/gitlint/action.yml b/.github/actions/gitlint/action.yml index 5f0417b..cb16e6f 100644 --- a/.github/actions/gitlint/action.yml +++ b/.github/actions/gitlint/action.yml @@ -31,9 +31,11 @@ runs: git config --global --add safe.directory /github/workspace && \ git fetch origin +refs/heads/main:refs/remotes/origin/main && \ git fetch origin +refs/pull/${{ inputs.pr-number }}/head && \ - if ! gitlint --commits ${{ inputs.base-branch }}..HEAD; then \ + # Fetch the upstream .gitlint config from eclipse-score/score + git clone --depth 1 https://github.com/eclipse-score/score.git /tmp/score-gitlint && \ + if ! gitlint --config /tmp/score-gitlint/.gitlint --commits origin/main..HEAD; then \ echo -e "\nWARNING: Your commit message does not follow the required format." && \ - echo "Formatting rules: https://eclipse-score.github.io/score/process/guidance/git/index.html" && \ + echo "Formatting rules: https://eclipse-score.github.io/score/main/contribute/general/git.html#commit-message-format" && \ echo -e "To fix your commit message, run:\n" && \ echo " git commit --amend" && \ echo "Then update your commit (fix gitlint warnings). Finally, force-push:" && \