Repository navigation
72 lines (67 loc) · 2.18 KB
/
Copy pathsemantic-pull-request.yml
File metadata and controls
72 lines (67 loc) · 2.18 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
69
70
71
72
name: "Check PR title and description"
on:
pull_request_target: # zizmor: ignore[dangerous-triggers] validates PR metadata with base-branch code; does not check out PR code
types:
- opened
- edited
- synchronize
permissions:
contents: read
pull-requests: read
jobs:
main:
name: Validate PR title
runs-on: ${{ vars.RUNNER_SEMANTIC_PULL_REQUEST || vars.DASH_LIGHT_RUNNER || 'ubuntu-latest' }}
steps:
- uses: amannn/action-semantic-pull-request@v6
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
# Configure which types are allowed (newline delimited).
# Default: https://github.com/commitizen/conventional-commit-types
# Our specific types/scopes (from https://github.com/dashpay/dash/blob/master/CONTRIBUTING.md#contributor-workflow)
types: |
feat
fix
docs
style
refactor
perf
test
build
guix
ci
lint
chore
revert
trivial
backport
# Configure which scopes are allowed (newline delimited).
scopes: |
consensus
interfaces
log
mining
net
qt
rest
rpc
scripts
stats
utils
wallet
zmq
# Checkout the base branch (pull_request_target default). Safe: no untrusted
# PR code is executed. The helper script and this workflow land together on
# merge, so enforcement starts after merge — same as the workflow YAML itself.
- name: Checkout
uses: actions/checkout@v6
with:
persist-credentials: false
# Reject @username mentions in the PR description. Mentions are copied
# into merge commits and re-notify people on merge/rebase/backport.
# Body is passed via env (not shell interpolation) to avoid injection.
- name: Check PR description for @mentions
env:
PR_BODY: ${{ github.event.pull_request.body }}
run: python3 .github/workflows/check_pr_description_mentions.py