Skip to content

Commit 7104d2c

Browse files
authored
chore: introduce pr-triage-manager to pr-labeler workflow (#19530)
`pr-triage-manager` will copy labels from linked issues to the PR. Only linked issues that will be closed when the PR is merged will be used. If a PR will close multiple issues, the highest priority will be selected. ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
1 parent 92ae07d commit 7104d2c

File tree

1 file changed

+17
-4
lines changed

1 file changed

+17
-4
lines changed

.github/workflows/pr-labeler.yml

+17-4
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,10 @@
33
name: pr-labeler
44
on:
55
pull_request:
6-
types: [ opened ]
6+
types:
7+
- opened
8+
- edited
9+
- reopened
710

811
jobs:
912
auto-approve:
@@ -13,6 +16,16 @@ jobs:
1316
pull-requests: write
1417
issues: write
1518
steps:
16-
- run: gh pr edit ${{ github.event.pull_request.number }} --add-label "auto-approve" -R ${{ github.repository }}
17-
env:
18-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
19+
- run: gh pr edit ${{ github.event.pull_request.number }} --add-label "auto-approve" -R ${{ github.repository }}
20+
env:
21+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
22+
copy-labels:
23+
runs-on: ubuntu-latest
24+
permissions:
25+
pull-requests: write
26+
steps:
27+
- uses: kaizen3031593/pr-triage-manager@main
28+
with:
29+
github-token: ${{ secrets.GITHUB_TOKEN }}
30+
31+

0 commit comments

Comments
 (0)