File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2525 steps :
2626 - name : Calculate Workload and Apply
2727 uses : actions/github-script@v7
28+ env :
29+ PR_REVIEWER_POOL : ${{ vars.PR_REVIEWER_POOL }}
2830 with :
2931 script : |
32+ // Read the candidate pool from the repository variable PR_REVIEWER_POOL
33+ // (Settings > Secrets and variables > Actions > Variables).
34+ // Value is a comma-separated list of GitHub logins who are qualified to be assigned PRs to review.
35+ const rawPool = process.env.PR_REVIEWER_POOL ?? '';
36+ const pool = rawPool.split(',').map(s => s.trim()).filter(Boolean);
37+ if (pool.length === 0) {
38+ core.warning('PR_REVIEWER_POOL variable is empty or not set. Skipping auto-assignment.');
39+ return;
40+ }
3041 const owner = context.repo.owner;
3142 const repo = context.repo.repo;
3243 const prNumber = context.issue.number;
You can’t perform that action at this time.
0 commit comments