-
Notifications
You must be signed in to change notification settings - Fork 112
31 lines (28 loc) · 1.03 KB
/
auto-labeler.yml
File metadata and controls
31 lines (28 loc) · 1.03 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
# Automatically add labels to PRs based on which files changed
#
# This complements pr-label.yml (title-based labeling):
# - pr-label.yml: Labels based on PR title prefix ([BugFix], [Feature], etc.)
# - auto-labeler.yml: Labels based on which files/directories changed
#
# Together they provide complete PR categorization:
# - Title-based labels capture the INTENT (bug fix, feature, etc.)
# - File-based labels capture the SCOPE (which components changed)
#------------------------------------------------------------
name: Auto Label PR (File-Based)
on:
pull_request_target:
types: [opened, synchronize]
jobs:
label:
runs-on: ubuntu-latest
permissions:
pull-requests: write
contents: read
steps:
- name: Apply labels based on changed files
uses: actions/labeler@v5
with:
repo-token: "${{ secrets.GITHUB_TOKEN }}"
# Don't remove labels that aren't in the config
# This preserves manually-added labels and title-based labels from pr-label.yml
sync-labels: false