2023-07-27 23:05:09 +00:00
|
|
|
name: 🤖 issue/pr assignment
|
2023-06-23 12:34:35 +00:00
|
|
|
on:
|
|
|
|
pull_request:
|
2023-06-26 10:40:56 +00:00
|
|
|
types: [opened]
|
2023-06-23 12:34:35 +00:00
|
|
|
branches:
|
|
|
|
- main
|
|
|
|
issues:
|
|
|
|
types: [opened]
|
|
|
|
|
2024-08-05 02:48:40 +00:00
|
|
|
env:
|
|
|
|
ASSIGN_TASK_TOKEN: ${{ secrets.PDTEAMX_PAT }} # github personal token
|
|
|
|
|
2023-06-23 12:34:35 +00:00
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
permissions: write-all
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2024-08-05 02:48:40 +00:00
|
|
|
- uses: actions/checkout@v4 # checkout the repository content
|
|
|
|
- uses: actions/setup-python@v5
|
2023-06-23 12:34:35 +00:00
|
|
|
with:
|
|
|
|
python-version: '3.10' # install the python version needed
|
2024-08-05 02:48:40 +00:00
|
|
|
- run: pip install requests
|
|
|
|
- if: github.event_name == 'pull_request'
|
2023-06-23 12:34:35 +00:00
|
|
|
run: python .github/scripts/assign_tasks.py ${{ github.event.pull_request.number }} pr ${{ secrets.GITHUB_TOKEN }}
|
2024-08-05 02:48:40 +00:00
|
|
|
- if: github.event_name == 'issues'
|
2023-06-23 12:34:35 +00:00
|
|
|
run: python .github/scripts/assign_tasks.py ${{ github.event.issue.number }} issue ${{ secrets.GITHUB_TOKEN }}
|