File tree Expand file tree Collapse file tree 1 file changed +16
-1
lines changed
Expand file tree Collapse file tree 1 file changed +16
-1
lines changed Original file line number Diff line number Diff line change @@ -16,10 +16,25 @@ jobs:
1616 with :
1717 token : ${{ secrets.GITHUB_TOKEN }}
1818
19+ # Workaround limitation/bug in commit-message-checker-with-regex (action below) where
20+ # it breaks if there are "too many" commits in the PR.
21+ # Ref: https://github.com/tim-actions/commit-message-checker-with-regex/issues/7
22+
23+ - name : Reduce commit data
24+ run : >
25+ echo '${{ steps.get-pr-commits.outputs.commits }}' | \
26+ jq --monochrome-output --compact-output '[.[] | {"sha": .sha, "commit":{ "message": .commit.message }}]' \
27+ > filtered-commits.json
28+
29+ - name : Load filtered commit data into output
30+ id : ' get-pr-commit-messages'
31+ run : >
32+ echo "commit-messages=$(cat filtered-commits.json)" >> $GITHUB_OUTPUT
33+
1934 - if : contains(github.head_ref, 'renovate/') != true
2035 name : check subject line length
2136 uses : tim-actions/commit-message-checker-with-regex@094fc16ff83d04e2ec73edb5eaf6aa267db33791 # v0.3.2
2237 with :
23- commits : ${{ steps.get-pr-commits .outputs.commits }}
38+ commits : ${{ steps.get-pr-commit-messages .outputs.commit-messages }}
2439 pattern : ' ^.{0,72}(\n.*)*$'
2540 error : ' Subject too long (max 72)'
You can’t perform that action at this time.
0 commit comments