-
Notifications
You must be signed in to change notification settings - Fork 2
43 lines (41 loc) · 1.71 KB
/
pr-labeler.yml
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
# Automatically assign labels to pull requests.
# See https://github.com/github/issue-labeler
name: "Pull request labeler"
on:
pull_request:
types:
- "opened"
- "edited"
jobs:
triage:
# Don't run pr-labeler on branches that were created by Dependabot,
# because this removes the labels set by Dependabot.
# `branches-ignore` cannot be used, because this checks against the
# target branch of the pull request, however we have to check
# against the head branch of the pull request. Solution: if
# statement, taken from
# https://stackoverflow.com/questions/68388484/github-actions-exclude-pull-requests-from-a-branch
if: "startsWith(github.head_ref, 'dependabot/') == false"
permissions:
contents: "read"
pull-requests: "write"
runs-on: "ubuntu-latest"
steps:
- uses: "github/[email protected]"
with:
repo-token: "${{ secrets.GITHUB_TOKEN }}"
configuration-path: ".github/pr-labeler-config.yml"
# Updating the config file or the pull request template can
# have impact on the labeling of existing pull requests. To
# prevent this, we couple the config file and pull request
# template by a version number.
enable-versioned-regex: 1
versioned-regex: 'issue_labeler_regex_version=(\d+)'
# `body-missing-regex-label` causes the pr-labeler workflow to
# fail with
# "Could not remove label "broken-template" from issue #Number
# Error: AggregateError"
# Therefore, disable it.
#body-missing-regex-label: "broken-template"
# Include the issue title in the regular expression target.
include-title: 1