File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -14,22 +14,19 @@ jobs:
1414 check-commit-messages :
1515 runs-on : ubuntu-latest
1616 steps :
17- - name : " 📜 Check commit messages format "
18- uses : gsactions/commit-message-checker@v1
17+ - name : " ⏳ Checkout repository "
18+ uses : actions/checkout@v4
1919 with :
20- pattern : ' ^[^!]+: [A-Za-z]+.+ .+\.$'
21- flags : " gm"
22- error : " Commit subject line must match the following pattern: <scope>: <description>."
23- excludeTitle : " false"
24- excludeDescription : " true"
25- checkAllCommitMessages : " true"
26- accessToken : ${{ secrets.GITHUB_TOKEN }}
27- - name : " 📜 Check commit messages length"
28- uses : gsactions/commit-message-checker@v1
20+ fetch-depth : 0
21+
22+ - name : " 🟢 Set up Node.js"
23+ uses : actions/setup-node@v4
2924 with :
30- pattern : " ^[^#].{10,78}$"
31- error : " Commit subject line maximum line length of 78 characters is exceeded."
32- excludeTitle : " false"
33- excludeDescription : " true"
34- checkAllCommitMessages : " true"
35- accessToken : ${{ secrets.GITHUB_TOKEN }}
25+ node-version : " 20.17.x"
26+ cache : " npm"
27+
28+ - name : " 🛠 Install commitlint"
29+ run : npm ci --ignore-scripts
30+
31+ - name : " 📜 Validate commit messages"
32+ run : npx --no-install commitlint --from ${{ github.event.pull_request.base.sha }} --to ${{ github.event.pull_request.head.sha }} --verbose
You can’t perform that action at this time.
0 commit comments