Skip to content

Commit 37f109a

Browse files
stephanosionashif
authored andcommitted
ci: Add pull request assigner workflow
This commit adds the "Pull Request Assigner" workflow that automatically assigns the reviewers, assignee and labels for a pull request. Note that this workflow runs on the `pull_request_target` event in the context of the base branch using the `MAINTAINERS.yml` from the base branch. Signed-off-by: Stephanos Ioannidis <[email protected]>
1 parent 2048316 commit 37f109a

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed

.github/workflows/assigner.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: Pull Request Assigner
2+
3+
on:
4+
pull_request_target:
5+
branches:
6+
- main
7+
- v*-branch
8+
9+
jobs:
10+
assignment:
11+
name: Pull Request Assignment
12+
runs-on: ubuntu-20.04
13+
14+
steps:
15+
- name: Install Python dependencies
16+
run: |
17+
sudo pip3 install -U setuptools wheel pip
18+
pip3 install -U PyGithub>=1.55
19+
20+
- name: Check out source code
21+
uses: actions/checkout@v2
22+
23+
- name: Run assignment script
24+
env:
25+
GITHUB_TOKEN: ${{ secrets.ZB_GITHUB_TOKEN }}
26+
run: |
27+
python3 scripts/set_assignees.py \
28+
-v \
29+
-o ${{ github.event.repository.owner.login }} \
30+
-r ${{ github.event.repository.name }} \
31+
-M MAINTAINERS.yml \
32+
-P ${{ github.event.pull_request.number }}

0 commit comments

Comments
 (0)