2024-04-17 14:38:32 -04:00
|
|
|
name: Assign Reviewer
|
|
|
|
|
|
|
|
on:
|
|
|
|
pull_request:
|
|
|
|
types: ["labeled"]
|
|
|
|
|
|
|
|
permissions:
|
|
|
|
pull-requests: write
|
|
|
|
|
|
|
|
jobs:
|
2024-05-14 04:02:00 -04:00
|
|
|
assign_reviewer:
|
2024-04-17 14:38:32 -04:00
|
|
|
runs-on: ubuntu-latest
|
2024-05-14 04:02:00 -04:00
|
|
|
if: github.event.label.name == 'dependencies' && github.event.pull_request.user.login == 'app/renovate'
|
2024-04-17 14:38:32 -04:00
|
|
|
steps:
|
2024-05-13 04:42:07 -04:00
|
|
|
- uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5
|
2024-04-17 14:38:32 -04:00
|
|
|
- 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}"
|