Skip to content

Commit 1552d9d

Browse files
authored
gitlint: Use gitlint from score (#35)
Track and use the same .gitlint settings as in score repo. Signed-off-by: Nicolae Dicu <[email protected]>
1 parent 3bde60c commit 1552d9d

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

.github/actions/gitlint/action.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,11 @@ runs:
3131
git config --global --add safe.directory /github/workspace && \
3232
git fetch origin +refs/heads/main:refs/remotes/origin/main && \
3333
git fetch origin +refs/pull/${{ inputs.pr-number }}/head && \
34-
if ! gitlint --commits ${{ inputs.base-branch }}..HEAD; then \
34+
# Fetch the upstream .gitlint config from eclipse-score/score
35+
git clone --depth 1 https://github.com/eclipse-score/score.git /tmp/score-gitlint && \
36+
if ! gitlint --config /tmp/score-gitlint/.gitlint --commits origin/main..HEAD; then \
3537
echo -e "\nWARNING: Your commit message does not follow the required format." && \
36-
echo "Formatting rules: https://eclipse-score.github.io/score/process/guidance/git/index.html" && \
38+
echo "Formatting rules: https://eclipse-score.github.io/score/main/contribute/general/git.html#commit-message-format" && \
3739
echo -e "To fix your commit message, run:\n" && \
3840
echo " git commit --amend" && \
3941
echo "Then update your commit (fix gitlint warnings). Finally, force-push:" && \

0 commit comments

Comments
 (0)