mirror of
https://github.com/huggingface/transformers.git
synced 2025-07-03 21:00:08 +06:00

* First draft of github action on PR opening for auto-assigning reviewers * fix missing import * Don't reassign reviewers if we already have them * Temporarily comment out the opened line so we can test the script * Correct path for codeowners file * Update workflow permissions * Update workflow permissions * Update debug logs * Strip inline comments * Remove prefix * Request reviews instead of assigning * Request reviews instead of assigning * Add TODO * Use pull-request-target instead * Update the script * Set back to pull_request for testing * Set to pull_request_target, testing works! * Add licence * Tighten up one of the globs * Refactor things to be a bit less convoluted * Only assign reviewers when marked ready for review
26 lines
649 B
YAML
26 lines
649 B
YAML
name: Assign PR Reviewers
|
|
on:
|
|
pull_request_target:
|
|
branches:
|
|
- main
|
|
types: [ready_for_review]
|
|
|
|
jobs:
|
|
assign_reviewers:
|
|
permissions:
|
|
pull-requests: write
|
|
runs-on: ubuntu-22.04
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- name: Set up Python
|
|
uses: actions/setup-python@v5
|
|
with:
|
|
python-version: '3.13'
|
|
- name: Install dependencies
|
|
run: |
|
|
python -m pip install --upgrade pip
|
|
pip install PyGithub
|
|
- name: Run assignment script
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
run: python .github/scripts/assign_reviewers.py |