Skip to content

[enh] [GH/CI] [WIP] [TEST] Auto-assign PR reviewers using module-owners information randomly #5

[enh] [GH/CI] [WIP] [TEST] Auto-assign PR reviewers using module-owners information randomly

[enh] [GH/CI] [WIP] [TEST] Auto-assign PR reviewers using module-owners information randomly #5

name: Auto assign reviewers
on:
pull_request_target:
types: [opened, synchronize, reopened]
workflow_dispatch:
inputs:
pr_number:
description: 'PR number to test assignment on'
required: true
type: string
dry_run:
description: 'Run in dry-run mode (just print commands)'
required: false
type: boolean
default: true
jobs:
assign:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Assign reviewers
env:
PR_NUMBER: ${{ github.event.inputs.pr_number || github.event.pull_request.number }}
PR_AUTHOR: ${{ github.event.pull_request.user.login || '' }}
GH_TOKEN: ${{ secrets.REVIEW_ASSIGNING_TOKEN }}
REVIEWER_LIMIT: '3'
run: python3 .github/scripts/assign_reviewers.py ${{ github.event.inputs.dry_run == 'true' && '--dry-run' || '' }}