From b12108c203ab7dc9137e0c7da17c97c4b76a922f Mon Sep 17 00:00:00 2001 From: Seongho Bae Date: Mon, 29 Jun 2026 21:26:56 +0900 Subject: [PATCH] Allow central fix scheduler target repositories --- .github/workflows/pr-review-fix-scheduler.yml | 22 ++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/.github/workflows/pr-review-fix-scheduler.yml b/.github/workflows/pr-review-fix-scheduler.yml index 119b4677f..b43be9715 100644 --- a/.github/workflows/pr-review-fix-scheduler.yml +++ b/.github/workflows/pr-review-fix-scheduler.yml @@ -18,6 +18,11 @@ on: required: false default: "1" type: string + target_repository: + description: Repository to scan, in owner/name form; defaults to the caller repository + required: false + default: "" + type: string retry_hours: description: Minimum hours before redispatching autofix for the same head required: false @@ -53,6 +58,14 @@ on: description: Maximum autofix runs to dispatch required: false default: "1" + target_repository: + description: Repository to scan, in owner/name form; defaults to PR_REVIEW_FIX_TARGET_REPOSITORY or this repository + required: false + default: "" + base_branch: + description: Base branch to scan; defaults to PR_REVIEW_FIX_BASE_BRANCH or this repository default branch + required: false + default: "" retry_hours: description: Minimum hours before redispatching autofix for the same head required: false @@ -61,9 +74,11 @@ on: description: Target repository autofix workflow file required: false default: "pr-review-autofix.yml" + schedule: + - cron: "23 */2 * * *" concurrency: - group: central-pr-review-fix-scheduler-${{ github.repository }} + group: central-pr-review-fix-scheduler-${{ inputs.target_repository || vars.PR_REVIEW_FIX_TARGET_REPOSITORY || github.repository }} cancel-in-progress: false jobs: @@ -78,7 +93,8 @@ jobs: env: FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true GH_TOKEN: ${{ github.token }} - DEFAULT_BRANCH: ${{ inputs.base_branch || github.event.repository.default_branch }} + TARGET_REPOSITORY: ${{ inputs.target_repository || vars.PR_REVIEW_FIX_TARGET_REPOSITORY || github.repository }} + DEFAULT_BRANCH: ${{ inputs.base_branch || vars.PR_REVIEW_FIX_BASE_BRANCH || github.event.repository.default_branch }} DRY_RUN: ${{ inputs.dry_run == true }} MAX_PRS: ${{ inputs.max_prs || '50' }} MAX_DISPATCHES: ${{ inputs.max_dispatches || '1' }} @@ -101,7 +117,7 @@ jobs: run: | set -euo pipefail args=( - --repo "$GITHUB_REPOSITORY" + --repo "$TARGET_REPOSITORY" --base-branch "$DEFAULT_BRANCH" --max-prs "$MAX_PRS" --max-dispatches "$MAX_DISPATCHES"