Skip to content

ci(claude): pass ai-review-prompts-ref explicitly from caller#73

Merged
heskew merged 1 commit intomainfrom
fix/caller-pass-explicit-ai-review-prompts-ref
May 6, 2026
Merged

ci(claude): pass ai-review-prompts-ref explicitly from caller#73
heskew merged 1 commit intomainfrom
fix/caller-pass-explicit-ai-review-prompts-ref

Conversation

@heskew
Copy link
Copy Markdown
Member

@heskew heskew commented May 6, 2026

Summary

Why

The reusable workflow auto-derives the ref by parsing github.workflow_ref, but in a workflow_call context that variable resolves to the caller's ref (e.g. refs/pull/72/merge), not the called workflow's ref. The reusable then tries to check out HarperFast/ai-review-prompts at refs/pull/72/merge and fails:

fatal: couldn't find remote ref refs/pull/72/merge

See https://github.com/HarperFast/oauth/actions/runs/25410329060 for the failed run on #72.

The reusable already supports ai-review-prompts-ref as an explicit input override. This PR uses it.

Followup

  • harper #478 needs the same fix on its caller.
  • After both callers are passing the input explicitly, drop the broken auto-derive in HarperFast/ai-review-prompts and make the input required.

Test plan

🤖 Generated with Claude Code

The reusable's auto-derive of the called-workflow ref doesn't work:
in a workflow_call context, github.workflow_ref resolves to the
CALLER's ref (e.g. refs/pull/72/merge), not the called workflow's
ref. The reusable then tries to check out HarperFast/ai-review-prompts
at refs/pull/72/merge and fails: "couldn't find remote ref".

Until GitHub exposes the called-workflow ref to reusables, the
caller passes the SHA explicitly via the existing
ai-review-prompts-ref input (already supported as an override).
The pin lives in two places now, but they bump together.

Followup: HarperFast/ai-review-prompts will drop the broken
auto-derive once both callers (oauth + harper) are passing the
input explicitly.
@heskew heskew requested a review from a team as a code owner May 6, 2026 01:27
@heskew heskew merged commit 2ebe88c into main May 6, 2026
7 of 8 checks passed
@heskew heskew deleted the fix/caller-pass-explicit-ai-review-prompts-ref branch May 6, 2026 01:32
heskew added a commit to HarperFast/harper that referenced this pull request May 6, 2026
Same fix as oauth#73: the reusable's auto-derive of the called-
workflow ref doesn't work in workflow_call context (github.workflow_ref
resolves to the CALLER's ref). Pass the SHA explicitly via the
existing ai-review-prompts-ref input until the followup PR drops
the broken auto-derive.

See HarperFast/oauth#73 for the prior art and rationale.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant