Skip to content

Commit 2bf2cfd

Browse files
Utilize reusable PR label workflow (#39)
1 parent 4e38f6c commit 2bf2cfd

File tree

1 file changed

+10
-32
lines changed

1 file changed

+10
-32
lines changed
Lines changed: 10 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,15 @@
11
name: Label Pull Request
22

33
on:
4-
pull_request:
5-
# Only following types are handled by the action, but one can default to all as well
6-
types: [opened, reopened, synchronize]
7-
8-
permissions:
9-
contents: read
4+
pull_request:
5+
types: [opened, reopened, synchronize]
106

117
jobs:
12-
configure-labels:
13-
permissions:
14-
issues: write
15-
runs-on: ubuntu-latest
16-
steps:
17-
- uses: actions/checkout@8edcb1bdb4e267140fa742c62e395cd74f332709
18-
- name: Configure missing labels
19-
env:
20-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
21-
run: |
22-
gh label ls --json name > labels.json
23-
jq -e 'if map(select(.name | contains ("patch"))) == [] then null else "Label patch exists" end' labels.json || gh label create patch --color "006b75"
24-
jq -e 'if map(select(.name | contains ("minor"))) == [] then null else "Label minor exists" end' labels.json || gh label create minor --color "fbca04"
25-
jq -e 'if map(select(.name | contains ("major"))) == [] then null else "Label major exists" end' labels.json || gh label create major --color "b60205"
26-
label-pr:
27-
permissions:
28-
contents: read
29-
pull-requests: write
30-
runs-on: ubuntu-latest
31-
steps:
32-
- uses: release-drafter/release-drafter@b1476f6e6eb133afa41ed8589daba6dc69b4d3f5
33-
with:
34-
disable-autolabeler: false
35-
disable-releaser: true
36-
env:
37-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
8+
check:
9+
name: "Label Pull Request"
10+
permissions:
11+
contents: read
12+
issues: write
13+
pull-requests: write
14+
uses: launchbynttdata/launch-workflows/.github/workflows/reusable-pr-label-by-branch.yml@0.6.0
15+
secrets: inherit # pragma: allowlist secret

0 commit comments

Comments
 (0)