-
Notifications
You must be signed in to change notification settings - Fork 1
68 lines (60 loc) · 1.89 KB
/
Copy pathpr-quality.yml
File metadata and controls
68 lines (60 loc) · 1.89 KB
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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
name: PR Quality Checks
on:
pull_request:
types:
- opened
- edited
- reopened
- synchronize
jobs:
test-live-docs:
name: Test live-docs scripts
runs-on: ubuntu-latest
steps:
- name: Harden Runner
uses: step-security/harden-runner@e14015d583714f6e62063499dc959a02595150a1 # v2.21.1
with:
egress-policy: audit
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
- uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
with:
python-version: '3.14'
- name: Install dependencies
run: pip install requests pytest
- name: Run tests
run: pytest tests/
validate-title:
name: Validate PR Title
runs-on: ubuntu-latest
permissions:
pull-requests: read
steps:
- name: Harden Runner
uses: step-security/harden-runner@e14015d583714f6e62063499dc959a02595150a1 # v2.21.1
with:
egress-policy: audit
- name: Check PR title follows Conventional Commit format
uses: amannn/action-semantic-pull-request@48f256284bd46cdaab1048c3721360e808335d50 # v6.1.1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
# Configure allowed types (based on conventional commits)
types: |
feat
fix
docs
style
refactor
perf
test
build
ci
chore
revert
# Don't require a scope (e.g., "feat(<scope>): ...")
requireScope: false
# Don't allow subject to start with uppercase letter
subjectPattern: ^(?![A-Z]).+$
subjectPatternError: |
The subject (description) should start with a lowercase letter.
Example: "feat(api): add new endpoint" (not "feat(api): Add new endpoint")