-
Notifications
You must be signed in to change notification settings - Fork 4
42 lines (40 loc) · 1.21 KB
/
commit_checks.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
name: Commit Checks
on: [push, pull_request]
jobs:
Black:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: psf/black@stable
Ruff:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: chartboost/ruff-action@v1
isort:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: isort/isort-action@v1
check-commit-message:
name: Check Commit Message
runs-on: ubuntu-latest
steps:
- name: Check Commit Format
uses: gsactions/commit-message-checker@v2
with:
pattern: 'Issue \#[0-9]+: .+'
checkAllCommitMessages: 'true'
error: 'Your first line has to have the format "Issue #XXX: Commit message".'
excludeDescription: 'true'
excludeTitle: 'true'
accessToken: ${{ secrets.GITHUB_TOKEN }}
- name: Check Line Length
uses: gsactions/commit-message-checker@v2
with:
pattern: '.{1,72}'
error: 'The maximum line length of 72 characters is exceeded.'
excludeDescription: 'true'
excludeTitle: 'true'
checkAllCommitMessages: 'true'
accessToken: ${{ secrets.GITHUB_TOKEN }}