Skip to content

feat(CI): Add a new task to automatically assign a team label on a dependabot PR #1

feat(CI): Add a new task to automatically assign a team label on a dependabot PR

feat(CI): Add a new task to automatically assign a team label on a dependabot PR #1

name: Assign Dependabot PRs
on:
pull_request:
jobs:
label_pr:
if: github.actor == 'dependabot[bot]'
permissions:
pull-requests: write
env:
GH_TOKEN: ${{ github.token }}
PR_ID: ${{ github.event.number }}
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.11"
cache: "pip"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Add label according to modified dependency
run: |
invoke add-team-label --pr-id $PR_ID