2022-06-08 22:37:59 +08:00
|
|
|
name: Pull Request Assigner
|
|
|
|
|
|
|
|
on:
|
|
|
|
pull_request_target:
|
2022-06-09 20:43:51 +08:00
|
|
|
types:
|
|
|
|
- opened
|
|
|
|
- synchronize
|
|
|
|
- reopened
|
|
|
|
- ready_for_review
|
2022-06-08 22:37:59 +08:00
|
|
|
branches:
|
|
|
|
- main
|
|
|
|
- v*-branch
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
assignment:
|
|
|
|
name: Pull Request Assignment
|
2022-06-09 20:43:51 +08:00
|
|
|
if: github.event.pull_request.draft == false
|
2023-03-19 02:39:12 +08:00
|
|
|
runs-on: ubuntu-22.04
|
2022-06-08 22:37:59 +08:00
|
|
|
|
|
|
|
steps:
|
|
|
|
- name: Install Python dependencies
|
|
|
|
run: |
|
|
|
|
sudo pip3 install -U setuptools wheel pip
|
|
|
|
pip3 install -U PyGithub>=1.55
|
|
|
|
|
|
|
|
- name: Check out source code
|
2022-10-14 01:48:20 +08:00
|
|
|
uses: actions/checkout@v3
|
2022-06-08 22:37:59 +08:00
|
|
|
|
|
|
|
- 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 }}
|