From 64d34bd33b903093a4134767d7096fb8d54ba21f Mon Sep 17 00:00:00 2001 From: Steve Dudenhoeffer Date: Wed, 15 Jul 2026 23:34:07 -0400 Subject: [PATCH] fix(reusable): thread the dispatch pr_number as a workflow_call input Gitea >= 1.27 does not propagate the caller's workflow_dispatch inputs into a called workflow's github.event (same rework that changed event_name), so a manual 'review PR #N' dispatch arrived with an empty PR and died at the entrypoint's 'PR required' check. Accept pr_number as an explicit workflow_call input and fold it into the PR env fallback chain; caller stubs pass github.event.inputs.pr_number through. Co-Authored-By: Claude Fable 5 --- .gitea/workflows/review-reusable.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.gitea/workflows/review-reusable.yml b/.gitea/workflows/review-reusable.yml index b8df0e4..7fb18a6 100644 --- a/.gitea/workflows/review-reusable.yml +++ b/.gitea/workflows/review-reusable.yml @@ -59,6 +59,11 @@ on: max_steps: { type: string, default: "14" } # GADFLY_MAX_STEPS worker_model: { type: string, default: "" } # GADFLY_WORKER_MODEL allowed_users: { type: string, default: "" } # GADFLY_ALLOWED_USERS (consumer-specific; set in your stub) + # Gitea >= 1.27 does not propagate the CALLER's workflow_dispatch inputs into a + # called workflow's github.event, so a manual "review PR #N" dispatch arrived + # here with an empty PR and died at the entrypoint's "PR required" check. The + # caller stub must thread it explicitly: `pr_number: ${{ github.event.inputs.pr_number }}`. + pr_number: { type: string, default: "" } trigger_phrase: { type: string, default: "" } # GADFLY_TRIGGER_PHRASE consolidate: { type: string, default: "" } # GADFLY_CONSOLIDATE — "" => auto (one consensus comment for >=2 models); "0" => one comment per model inline_review: { type: string, default: "" } # GADFLY_INLINE_REVIEW — "" => on (post a COMMENT-state PR review with inline comments on changed lines); "0" => off @@ -104,7 +109,7 @@ jobs: # forwarding, since the auto token isn't a forwarded workflow_call secret. GITEA_TOKEN: ${{ github.token }} EVENT_NAME: ${{ github.event_name }} - PR: ${{ github.event.pull_request.number || github.event.issue.number || github.event.inputs.pr_number }} + PR: ${{ github.event.pull_request.number || github.event.issue.number || github.event.inputs.pr_number || inputs.pr_number }} PR_BRANCH: ${{ github.head_ref }} IS_DRAFT: ${{ github.event.pull_request.draft }} COMMENT_BODY: ${{ github.event.comment.body }} -- 2.54.0