-
Notifications
You must be signed in to change notification settings - Fork 159
30 lines (27 loc) · 904 Bytes
/
pr-title.yml
File metadata and controls
30 lines (27 loc) · 904 Bytes
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
name: Lint PR Title
# Validate that PR titles follow Conventional Commits format.
# Since we squash merge PRs, the PR title becomes the merge commit message,
# which Python Semantic Release uses to determine version bumps.
#
# This avoids burdening external contributors with conventional commit enforcement
# on every individual commit. See: https://www.conventionalcommits.org/en/v1.0.0/
#
# NOTE: pull_request_target is used instead of pull_request because it runs in the
# context of the base branch and has reliable access to the GITHUB_TOKEN for reading
# PR metadata.
on:
pull_request_target:
types:
- opened
- edited
- reopened
jobs:
main:
name: Validate PR title
runs-on: ubuntu-latest
permissions:
pull-requests: read
steps:
- uses: amannn/action-semantic-pull-request@v6
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}