-
-
Notifications
You must be signed in to change notification settings - Fork 249
32 lines (30 loc) · 999 Bytes
/
semantic-pull-request.yml
File metadata and controls
32 lines (30 loc) · 999 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
31
32
name: Semantic Pull Request
on:
# zizmor: ignore[dangerous-triggers]
# SAFETY: pull_request_target is used here because:
# - The workflow does NOT check out PR code
# - Only PR title is read
# - No PR-supplied code is executed
pull_request_target:
types:
- opened
- edited
- synchronize
jobs:
main:
if: github.repository == 'vitejs/vite-plugin-react'
runs-on: ubuntu-latest
name: Semantic Pull Request
permissions:
pull-requests: read
steps:
- name: Validate PR title
uses: amannn/action-semantic-pull-request@48f256284bd46cdaab1048c3721360e808335d50 # v6
with:
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 }}