Skip to content

Commit d4d97e6

Browse files
committed
NO-JIRA: chore(gha): add workflow to label PRs with "review-requested" on creation
This can then be tied up with the Slack notification mechanism, so that we aren't spammed by konflux-nudge PRs.
1 parent 004c38e commit d4d97e6

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: Add Review Requested Label
2+
on:
3+
pull_request:
4+
types: [opened]
5+
6+
permissions:
7+
pull-requests: write
8+
9+
jobs:
10+
add-label:
11+
if: contains(github.event.pull_request.labels.*.name, 'konflux-nudge') == false
12+
runs-on: ubuntu-latest
13+
steps:
14+
- name: Add review-requested label
15+
uses: actions/github-script@v6
16+
with:
17+
# language=javascript
18+
script: |
19+
await github.rest.issues.addLabels({
20+
owner: context.repo.owner,
21+
repo: context.repo.repo,
22+
issue_number: context.payload.pull_request.number,
23+
labels: ['review-requested']
24+
});

0 commit comments

Comments
 (0)