Skip to content

Fix workflow_call checkout for target PR branch#615

Merged
strawgate merged 2 commits intomainfrom
fix/workflow-call-checkout-target-pr
Mar 9, 2026
Merged

Fix workflow_call checkout for target PR branch#615
strawgate merged 2 commits intomainfrom
fix/workflow-call-checkout-target-pr

Conversation

@strawgate
Copy link
Collaborator

Summary

  • add an explicit gh pr checkout "$PR_NUMBER" step in gh-aw-mention-in-pr-by-id so workflow_call/workflow_dispatch runs reliably operate on the target PR branch
  • keep existing PR context fetch behavior intact while ensuring branch checkout is not skipped outside pull_request event contexts
  • recompile .lock.yml to include the generated workflow change

Test plan

  • run make compile
  • verify source workflow diff includes checkout step
  • verify lock workflow contains compiled checkout step

Made with Cursor

Ensure mention-in-pr-by-id checks out the target PR branch via gh pr checkout during workflow_call runs, and recompile the lock workflow so scheduled/workflow_dispatch invocations can apply changes to the intended PR branch.

Made-with: Cursor
@coderabbitai
Copy link

coderabbitai bot commented Mar 9, 2026

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: cb92499a-4c8c-4d40-b285-00bae74d76e4

📥 Commits

Reviewing files that changed from the base of the PR and between 1af62ce and 0b28501.

📒 Files selected for processing (2)
  • .github/workflows/gh-aw-mention-in-pr-by-id.lock.yml
  • .github/workflows/gh-aw-mention-in-pr-by-id.md

📝 Walkthrough

Walkthrough

Updates the gh-aw-mention-in-pr workflow to include an explicit step that checks out the target PR branch using the GitHub CLI. The step sets GH_TOKEN and PR_NUMBER environment variables, then executes gh pr checkout to switch the workspace to the target PR branch. Changes span the workflow lock file and corresponding documentation.

Suggested labels

small_boom

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix/workflow-call-checkout-target-pr
  • 🛠️ Update Documentation: Commit on current branch
  • 🛠️ Update Documentation: Create PR

Comment @coderabbitai help to get the list of available commands and usage tips.

…ckout-target-pr

Made-with: Cursor

# Conflicts:
#	.github/workflows/gh-aw-mention-in-pr-by-id.lock.yml
@strawgate strawgate merged commit 62d6266 into main Mar 9, 2026
14 of 16 checks passed
@strawgate strawgate deleted the fix/workflow-call-checkout-target-pr branch March 9, 2026 05:03
@github-actions github-actions bot added the medium_boom Medium PR blast radius; likely benefits from human review label Mar 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

medium_boom Medium PR blast radius; likely benefits from human review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant