mirror of
https://github.com/edgelesssys/constellation.git
synced 2024-10-01 01:36:09 -04:00
deps: auto-assign reviewer for deps PRs (#3032)
* deps: auto-assign reviewer for deps PRs Co-authored-by: Daniel Weiße <66256922+daniel-weisse@users.noreply.github.com>
This commit is contained in:
parent
35e19a45bb
commit
9b52ec403b
30
.github/workflows/assign_reviewer.yml
vendored
Normal file
30
.github/workflows/assign_reviewer.yml
vendored
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
name: Assign Reviewer
|
||||||
|
|
||||||
|
on:
|
||||||
|
pull_request:
|
||||||
|
types: ["labeled"]
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
pull-requests: write
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
specific_review_requested:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
if: ${{ github.event.label.name == 'dependencies'}}
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
|
||||||
|
- 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}"
|
Loading…
Reference in New Issue
Block a user