-
Notifications
You must be signed in to change notification settings - Fork 54
36 lines (33 loc) · 1.08 KB
/
assign_reviewer.yml
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
name: Assign Reviewer
on:
pull_request:
types:
- opened
- reopened
- edited
- synchronize
- review_request_removed
- labeled
permissions:
pull-requests: write
jobs:
assign_reviewer:
runs-on: ubuntu-latest
if: contains(github.event.pull_request.labels.*.name, 'dependencies') && toJson(github.event.pull_request.requested_reviewers) == '[]' && github.event.pull_request.user.login == 'renovate[bot]'
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Pick assignee
id: pick-assignee
uses: ./.github/actions/pick_assignee
- name: Assign reviewer
env:
GH_TOKEN: ${{ github.token }}
PR: ${{ github.event.pull_request.number }}
ASSIGNEE: ${{ steps.pick-assignee.outputs.assignee }}
run: |
gh api \
--method POST \
-H "Accept: application/vnd.github+json" \
-H "X-GitHub-Api-Version: 2022-11-28" \
"/repos/edgelesssys/constellation/pulls/${PR}/requested_reviewers" \
-f "reviewers[]=${ASSIGNEE}"