Skip to content

ci(review): set allow_fork_prs so Claude reviews and fixes fork PRs again - #3224

Merged
giswqs merged 1 commit into
mainfrom
ci/allow-fork-prs
Nov 28, 2026
Merged

giswqs merged 1 commit into
mainfrom
ci/allow-fork-prs

Conversation

@giswqs

@giswqs giswqs commented Nov 28, 2026 •

Copy link
Copy Markdown
Member

Since #3177 bumped anthropics/claude-code-action from 1.0.280 to 1.0.289, Claude Code Review passes on fork PRs without posting anything. The log says Skipped, because allow_fork_prs is not true (seen on #3184 at 496ce24).

Upstream added an allow_fork_prs input (anthropics/claude-code-action#2094) and then made it default to "false" (#2114, a breaking change). With that default, the action skips fork pull requests before it checks anything out. Both of our workflows run under pull_request_target mainly to serve forks, so they were skipped too.

Change

  • claude-code-review.yml: set allow_fork_prs: "true" on the review step.
  • claude-autofix.yml: set it on both action steps (resolving conflicts and fixing the review threads). Autofix pushes to a fork when "Allow edits by maintainers" is on, so it was hit the same way.

Nothing else about which fork PRs we handle changes. The jobs' if: conditions still decide eligibility (first-time contributors still need a maintainer to trigger a review), and the agents still have no shell. The new restrict_untrusted_prs input (default true) stays on. It only denies shell commands, and neither workflow gives the agent Bash.

Surfaces

CI only. Nothing in the app, CLI, Python, web or mobile is affected.

Verification

Both workflow files parse as YAML, and pre-commit run --all-files passes. The real test is the next fork PR: the review should post again after this merges, because pull_request_target runs the workflow from main.

Summary by CodeRabbit

  • Improvements
    • Automated code reviews, conflict resolution, and review-thread fixes now support pull requests from forks, allowing these workflows to run for contributions submitted from forked repositories.

…gain

claude-code-action 1.0.289 (bumped in #3177) skips pull requests from forks
unless allow_fork_prs is "true" (upstream #2114), and the step still passes,
so fork PRs such as #3184 got no review. Set it on the review step and both
autofix steps.
@coderabbitai

coderabbitai Bot commented Nov 28, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

Caution

Review failed

The pull request is closed.

Walkthrough

The Claude autofix and code review workflows now set allow_fork_prs to "true". Comments describe the action’s default behavior for fork pull requests.

Changes: Fork pull request action configuration

Layer / File(s) Summary
Enable fork pull request handling
.github/workflows/claude-autofix.yml, .github/workflows/claude-code-review.yml
Both Claude autofix action invocations and the code review action set allow_fork_prs to "true". Comments document the action’s default behavior for fork pull requests.

Estimated code review effort: 1 (Trivial) | ~5 minutes

Change: Bug fix

Possibly related PRs

  • opengeos/RustGIS#996: Introduced the fork pull request autofix path that depends on the Claude action running for fork pull requests.

Suggested reviewers: elpidioassinaturas, mavrick-f

Merge Risk: Moderate · up to faa90

Enabling reviews and autofixes for fork PRs works as intended. However, the autofix workflow can commit reverts of a contributor's changes to files such as .gitmodules and CLAUDE.md onto their branch. Exclude those paths from staging before merging. The review prompt should also tell Claude where the proposed versions of replaced files live.

- [ ] Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

A rabbit checks the workflow lines
Fork pull requests now join the queue
Claude’s settings mark the path
The comments tell what actions do
Then off I hop beneath the moon

@giswqs
giswqs enabled auto-merge November 28, 2026 13:24
# this is set, and the check still passes, so nothing shows the review
# is missing. Fork PRs are the ones this pull_request_target workflow
# exists for; the job's `if:` above decides which are eligible.
allow_fork_prs: "true"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The new allow_fork_prs input only has an effect on claude-code-action 1.0.289 or later, and the comment above says that version is where the fork skip began. The action is pinned to eb56b6666facdbd501035f4a0269d8caee2e7a8b with the comment # v1 (Claude Code 2.1.220), which doesn't show the 1.0.x version. I could not check the pinned commit offline. If it predates 1.0.289, the input is ignored and fork PRs stay skipped, and the check still passes. Please confirm the pin is at or after 1.0.289 before merging, and consider putting the action version in the pin comment, so the next bump can't drop it silently. I checked the rest: all three action steps (review at line 451, autofix at lines 374 and 469) now set the flag, and the job if: gates are unchanged.

Category: quality

@github-actions

Copy link
Copy Markdown
Contributor

Code review

I reviewed the two workflow files (six added lines, no code changes) against the workflow headers, the if: gates and the PR description. The prior-review file had no threads, so there were no earlier concerns to skip.

Bugs: None found. The YAML indentation matches the neighbouring allowed_non_write_users key, and the "true" string matches the existing style. The flag is set on all three claude-code-action steps in the repo (review at line 451, autofix at lines 374 and 469), so no twin step is missed.

Security: None new. Setting the flag re-enables the agent on fork PRs under pull_request_target, which the PR description says is the behaviour before 1.0.280→1.0.289. The workflow headers accept that exposure by design: the review agent has no shell, and fork-branch autofix needs a maintainer label and "Allow edits by maintainers". The job if: gates are unchanged. Confidence: high.

Performance: None found.

Quality:

  • The pin comment does not show that the action version is 1.0.289 or later. allow_fork_prs only takes effect on that version or later, so if the pinned commit is older, fork PRs stay skipped and CI still passes. I could not check the upstream action offline. Inline comment posted on .github/workflows/claude-code-review.yml:476. Confidence: medium.

AGENTS.md: None found. The change touches CI only, so the app, CLI, Python, web and mobile surfaces don't apply.

Not verifiable here: the PR body says the real test is the next fork PR. Because pull_request_target runs from main, this PR's own checks can't exercise the change.

Change size

Compared with the base: merge base cee4b99 to PR head faa900d, the whole PR against main.

Files changed Added Modified Removed Renamed Size before Size after Total change
2 0 2 0 0 86.27 KB 87.12 KB +868 B
Path Size before Size after Change
.github/workflows/claude-autofix.yml 47.44 KB 47.87 KB +440 B
.github/workflows/claude-code-review.yml 38.83 KB 39.25 KB +428 B

@giswqs
giswqs disabled auto-merge November 28, 2026 13:26
@giswqs
giswqs merged commit 5cdcf5b into main Nov 28, 2026
15 of 17 checks passed
@giswqs
giswqs deleted the ci/allow-fork-prs branch November 28, 2026 13:26
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