-
-
Notifications
You must be signed in to change notification settings - Fork 757
49 lines (42 loc) · 1.38 KB
/
pr-labeling.yml
File metadata and controls
49 lines (42 loc) · 1.38 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
46
47
48
name: PR Labeling
# Story 6.1 - Added concurrency
on:
pull_request:
types: [opened, synchronize]
concurrency:
group: pr-labeling-${{ github.event.pull_request.number }}
cancel-in-progress: true
jobs:
label:
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: write
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Label PR based on files changed
uses: actions/labeler@v4
with:
repo-token: "${{ secrets.GITHUB_TOKEN }}"
configuration-path: .github/labeler.yml
sync-labels: true
- name: Check for expansion-pack changes
id: check-expansion-pack
run: |
if git diff --name-only origin/${{ github.base_ref }}...HEAD | grep -q "^expansion-packs/"; then
echo "has_expansion_pack=true" >> $GITHUB_OUTPUT
else
echo "has_expansion_pack=false" >> $GITHUB_OUTPUT
fi
- name: Add needs-po-review label for expansion-pack PRs
if: steps.check-expansion-pack.outputs.has_expansion_pack == 'true'
uses: actions/github-script@v7
with:
script: |
github.rest.issues.addLabels({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
labels: ['needs-po-review']
})