Skip to content

Commit 10c865d

Browse files
committed
ci: re-add commit subject length validation
To replace the one removed by commit 5432bc4. Signed-off-by: Kir Kolyshkin <[email protected]>
1 parent a22a894 commit 10c865d

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

.github/workflows/test.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,24 @@ jobs:
1818
with:
1919
version: v1.42
2020

21+
commit:
22+
runs-on: ubuntu-20.04
23+
# Only check commits on pull requests.
24+
if: github.event_name == 'pull_request'
25+
steps:
26+
- name: get pr commits
27+
id: 'get-pr-commits'
28+
uses: tim-actions/[email protected]
29+
with:
30+
token: ${{ secrets.GITHUB_TOKEN }}
31+
32+
- name: check subject line length
33+
uses: tim-actions/[email protected]
34+
with:
35+
commits: ${{ steps.get-pr-commits.outputs.commits }}
36+
pattern: '^.{0,72}(\n.*)*$'
37+
error: 'Subject too long (max 72)'
38+
2139
test:
2240
runs-on: ubuntu-20.04
2341
strategy:

0 commit comments

Comments
 (0)