Skip to content

Conversation

@akurtz
Copy link

@akurtz akurtz commented Oct 30, 2025

Purpose

Resolves #21

To help drive visibility and adoption of AI tooling / workflows at our company, I recently implemented a central GHA workflow that allows folks to request an Auggie review of a PR in another repo in the org. This uncovered a couple bugs in the review-pr action, where it was trying to post reviews to the workflow repo instead of the PR’s repo.

I forked the repo and made a few backwards-compatible tweaks (no new inputs, defaults unchanged) to ensure PR reviews are posted to the repo specified by repo_name (the PR’s repo) rather than the workflow repo. I verified that this is working now for both same-repo and cross-repo workflows.

Changes

  • Use repo_name for checkout so the PR head is fetched from the target repo
  • Use a separate checkout path (pr) to avoid clobbering local files (e.g. rules) in the workflow repo
  • Ensure reviews target the PR’s repo
    • Pass repo_name / pull_number in custom_context
    • Update template guidance with clear instruction to use the PR’s repo / pull number for all GitHub operations

Fix for action trying to post reviews to the repo of the triggering workflow instead of the PR’s repo

* Use repo_name input for PR checkout
* Use separate checkout path to avoid clobbering rules
* Ensure PR reviews target repo passed via repo_name
* Write action context output as single-line JSON

* Handle multi-line output when CUSTOM_GUIDELINES are not present
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.

Can't review a PR in a repo other than that of the triggering workflow

1 participant