-
Notifications
You must be signed in to change notification settings - Fork 285
45 lines (41 loc) · 1.42 KB
/
triage.yml
File metadata and controls
45 lines (41 loc) · 1.42 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
name: Triage PR
on:
# `pull_request_target` is required so the labeler/title-validator can
# write labels and statuses on PRs from forks (under `pull_request`,
# GitHub forces GITHUB_TOKEN to read-only for fork PRs). Safe here
# because this workflow:
# - never checks out PR code (no actions/checkout),
# - has no `run:` steps that interpolate PR fields,
# - only invokes SHA-pinned actions that read PR metadata via the API,
# - is locked behind required code-owner review (see .github/CODEOWNERS)
# so future edits cannot quietly add privileged execution surface.
pull_request_target: # zizmor: ignore[dangerous-triggers]
branches:
- main
types:
- opened
- reopened
- edited
- synchronize
- ready_for_review
permissions: {}
jobs:
pr-title:
name: Validate PR title
runs-on: ubuntu-latest
permissions:
pull-requests: read
steps:
- uses: amannn/action-semantic-pull-request@48f256284bd46cdaab1048c3721360e808335d50 # v6.1.1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
pr-labeler:
name: Auto-label PR
runs-on: ubuntu-latest
permissions:
contents: read # the config file
pull-requests: write # for labeling pull requests
statuses: write # to generate status
checks: write # to generate status
steps:
- uses: fuxingloh/multi-labeler@bcd50af464202999e57f556b4aefcf05a34abf85 # v5.0.0