File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : Conventional Commit Linter
2+
3+ on :
4+ push :
5+ branches :
6+ - main
7+ pull_request :
8+
9+ permissions :
10+ contents : read
11+
12+ jobs :
13+ commitlint :
14+ runs-on : ubuntu-latest
15+ steps :
16+ - name : Compute number of commits to fetch
17+ id : nb-of-commits
18+ # `+ 1` for PRs because of the merge commit
19+ run : |
20+ echo "toParse=$(echo "$EVENT" | jq -r 'if .commits then (.commits | length) else (.pull_request.commits + 1) end')" >> $GITHUB_OUTPUT
21+ env :
22+ EVENT : ${{ toJSON(github.event) }}
23+ - name : Checkout
24+ uses : actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
25+ with :
26+ persist-credentials : false
27+ sparse-checkout : .
28+ fetch-depth : ${{ steps.nb-of-commits.outputs.toParse }}
29+ - uses : wagoid/commitlint-github-action@b948419dd99f3fd78a6548d48f94e3df7f6bf3ed # v6.2.1
You can’t perform that action at this time.
0 commit comments