mirror of
https://github.com/edgelesssys/constellation.git
synced 2024-10-01 01:36:09 -04:00
9cd1184244
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
37 lines
1.1 KiB
YAML
37 lines
1.1 KiB
YAML
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@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
|
|
- 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}"
|