37f109a056
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 <root@stephanos.io>
33 lines
762 B
YAML
33 lines
762 B
YAML
name: Pull Request Assigner
|
|
|
|
on:
|
|
pull_request_target:
|
|
branches:
|
|
- main
|
|
- v*-branch
|
|
|
|
jobs:
|
|
assignment:
|
|
name: Pull Request Assignment
|
|
runs-on: ubuntu-20.04
|
|
|
|
steps:
|
|
- name: Install Python dependencies
|
|
run: |
|
|
sudo pip3 install -U setuptools wheel pip
|
|
pip3 install -U PyGithub>=1.55
|
|
|
|
- name: Check out source code
|
|
uses: actions/checkout@v2
|
|
|
|
- name: Run assignment script
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.ZB_GITHUB_TOKEN }}
|
|
run: |
|
|
python3 scripts/set_assignees.py \
|
|
-v \
|
|
-o ${{ github.event.repository.owner.login }} \
|
|
-r ${{ github.event.repository.name }} \
|
|
-M MAINTAINERS.yml \
|
|
-P ${{ github.event.pull_request.number }}
|