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-24 05:04:23 -04:00
|
|
|
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
|
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}"
|