Skip to content

Commit 27a13bf

Browse files
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. Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
1 parent 004c38e commit 27a13bf

File tree

1 file changed

+25
-0
lines changed

1 file changed

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

0 commit comments

Comments
 (0)