-
Notifications
You must be signed in to change notification settings - Fork 0
54 lines (49 loc) · 1.69 KB
/
pr-linter.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
43
44
45
46
47
48
49
50
51
52
53
54
---
name: Pull Request Linter
on:
pull_request_target:
types:
- opened
- edited
- synchronize
branches:
- main
permissions: # added using https://github.com/step-security/secure-workflows
contents: read
jobs:
lint:
permissions:
pull-requests: read # for amannn/action-semantic-pull-request to analyze PRs
statuses: write # for amannn/action-semantic-pull-request to mark status of analyzed PR
runs-on: ubuntu-latest
steps:
- name: Harden Security Runner
uses: step-security/harden-runner@v2
with:
egress-policy: block
allowed-endpoints: >
api.github.com:443
github.com:443
- name: Lint Pull Request
uses: amannn/action-semantic-pull-request@v5
with:
validateSingleCommit: true
wip: true
types: |
fix
feat
docs
style
refactor
perf
test
build
ci
requireScope: false
subjectPattern: ^(?![A-Z]).+$
subjectPatternError: |
The subject "{subject}" found in the pull request title "{title}"
didn't match the configured pattern. Please ensure that the subject
doesn't start with an uppercase character.
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}