-
Notifications
You must be signed in to change notification settings - Fork 2.7k
31 lines (30 loc) · 1.05 KB
/
autoassign.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
name: 🤖 issue/pr assignment
on:
pull_request:
types: [opened]
branches:
- main
issues:
types: [opened]
jobs:
build:
permissions: write-all
runs-on: ubuntu-latest
env:
ASSIGN_TASK_TOKEN: ${{ secrets.PDTEAMX_PAT }} # github personal token
steps:
- name: checkout repo content
uses: actions/checkout@v4 # checkout the repository content
- name: setup python
uses: actions/setup-python@v4
with:
python-version: '3.10' # install the python version needed
- name: install python packages
run: |
pip install requests
- name: execute python script on pr
if: ${{ github.event_name == 'pull_request' }}
run: python .github/scripts/assign_tasks.py ${{ github.event.pull_request.number }} pr ${{ secrets.GITHUB_TOKEN }}
- name: execute python script on issue opened
if: ${{ github.event_name == 'issues' }}
run: python .github/scripts/assign_tasks.py ${{ github.event.issue.number }} issue ${{ secrets.GITHUB_TOKEN }}