You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[CI] claude_review: target source PR's branch for follow-up PRs (#13774)
* [CI] claude_review: target source PR's branch for follow-up PRs
The follow-up PR was always cut from main, so once main moved on from the
PR's base the cherry-pick conflicted and the run failed (see run
26191835696). For non-fork PRs we now target the PR's own head branch
instead — Claude's edits apply cleanly regardless of how main has diverged,
and merging the follow-up folds them into the original PR. Fork PRs still
target the default branch since we can't push to a fork.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* [CI] claude_review: skip COMMIT THIS on fork PRs
Falling back to main as the base for fork PRs hits the same cherry-pick
conflict pattern the previous commit fixed for source PRs, and we can't
push to the fork's branch anyway. Bail early with a friendly comment
pointing users to apply Claude's suggestions manually or open an issue.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
# COMMIT THIS isn't supported on fork PRs: we can't push to the
193
+
# fork's branch, and falling back to main almost always conflicts
194
+
# once the PR touches files that also moved on main. Bail early —
195
+
# Claude's review comment with the suggested diff still stands.
196
+
if [[ "$IS_FORK" == "true" ]]; then
197
+
post_status "ℹ️ \`COMMIT THIS\` isn't supported on fork PRs. Apply Claude's suggestions manually, or open an issue to track them. See [workflow run]($RUN_URL)."
git commit -m "Apply changes from Claude (requested by @${COMMENT_USER} on #${PR_NUMBER})
@@ -248,6 +257,6 @@ jobs:
248
257
--title "Apply Claude's changes from #${PR_NUMBER}" \
249
258
--body "Automated PR with edits Claude made in response to \`COMMIT THIS\` from @${COMMENT_USER} on [#${PR_NUMBER}](${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}/pull/${PR_NUMBER}).
250
259
251
-
Targets \`${BASE_BRANCH}\` — independent of #${PR_NUMBER}. Further \`COMMIT THIS\` requests on *this* PR will commit directly to it.")
260
+
Targets \`${BASE_BRANCH}\` (the head branch of #${PR_NUMBER}). Merging this brings Claude's edits into that PR.")
252
261
253
262
post_status "✅ Opened follow-up PR (into \`${BASE_BRANCH}\`) with Claude's edits: ${NEW_PR_URL}"
0 commit comments