File tree Expand file tree Collapse file tree 2 files changed +43
-5
lines changed
Expand file tree Collapse file tree 2 files changed +43
-5
lines changed Original file line number Diff line number Diff line change @@ -18,8 +18,8 @@ inputs:
1818 description : " Pull Request number used to fetch commits"
1919 required : true
2020 base-branch :
21- description : " Base branch to compare commits against (default: origin/ main)"
22- default : " origin/ main"
21+ description : " Base branch to compare commits against (default: main)"
22+ default : " main"
2323 required : false
2424runs :
2525 using : " docker"
@@ -29,11 +29,12 @@ runs:
2929 - -c
3030 - |
3131 git config --global --add safe.directory /github/workspace && \
32- git fetch origin +refs/heads/main :refs/remotes/origin/main && \
32+ git fetch origin +refs/heads/${{ inputs.base-branch }} :refs/remotes/origin/${{ inputs.base-branch }} && \
3333 git fetch origin +refs/pull/${{ inputs.pr-number }}/head && \
34- if ! gitlint --commits origin/main ..HEAD; then \
34+ if ! gitlint --commits origin/${{ inputs.base-branch }} ..HEAD; then \
3535 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" && \
36+ echo "The tool gitlint is used to check the compliance with the rules described here:" && \
37+ echo -e "\nhttps://github.com/eclipse-score/module_template/blob/main/.gitlint" && \
3738 echo -e "To fix your commit message, run:\n" && \
3839 echo " git commit --amend" && \
3940 echo "Then update your commit (fix gitlint warnings). Finally, force-push:" && \
Original file line number Diff line number Diff line change 1+ # Available rules:
2+ #
3+ # T1: title-max-length
4+ # T2: title-trailing-whitespace
5+ # T3: title-trailing-punctuation (disabled)
6+ # T4: title-hard-tab
7+ # T5: title-must-not-contain-word (disabled)
8+ # T6: title-leading-whitespace
9+ # T7: title-match-regex
10+ # B1: body-max-line-length (disabled)
11+ # B2: body-trailing-whitespace
12+ # B3: body-hard-tab
13+ # B4: body-first-line-empty
14+ # B5: body-min-length (disabled)
15+ # B6: body-is-missing
16+ # B7: body-changed-file-mention (disabled)
17+ #
18+ # See http://jorisroovers.github.io/gitlint/rules/ for a full description of the rules.
19+
20+ # Ignore some default rules and enable regex style searching
21+ [general]
22+ ignore=T3,T5,B1,B5,B7
23+ regex-style-search=true
24+
25+ # Maximum length of the title
26+ [title-max-length]
27+ line-length=72
28+
29+ [title-match-regex]
30+ regex=^[a-z_-]+: .+$
31+
32+ # First line of the commit message body must be empty. (second line of the commit message)
33+ [body-first-line-empty]
34+
35+ #Ignores the title if it starts with Revert or Merge
36+ [ignore-by-title]
37+ regex=(^Revert |^Merge )
You can’t perform that action at this time.
0 commit comments