fix: configure upstream remote for cross-repo PR rebasing (#2505)
## Summary
- Add workflow step to configure `upstream` remote pointing to base repo
for cross-repo PRs
- Fetch `upstream/main` before Claude runs so rebase target is available
- Update pr-rebase skill to explicitly use `upstream/main` for
cross-repo PRs (falling back to `origin/main` for same-repo PRs)
The claude-rebase workflow was failing because only `origin` (pointing
to the fork) was configured. Claude would rebase onto `origin/main`
which may be stale instead of the base repo's current main.
## Test plan
- Trigger the cc:rebase label on a cross-repo PR and verify it rebases
onto the correct upstream/main
#skip-bugbot
🤖 Generated with [Claude Code](https://claude.com/claude-code)
<!-- devin-review-badge-begin -->
---
<a href="https://app.devin.ai/review/dyad-sh/dyad/pull/2505">
<picture>
<source media="(prefers-color-scheme: dark)"
srcset="https://static.devin.ai/assets/gh-open-in-devin-review-dark.svg?v=1">
<img
src="https://static.devin.ai/assets/gh-open-in-devin-review-light.svg?v=1"
alt="Open with Devin">
</picture>
</a>
<!-- devin-review-badge-end -->
<!-- This is an auto-generated description by cubic. -->
---
## Summary by cubic
Fixes cross-repo PR rebasing by adding an upstream remote to the base
repo and rebasing onto upstream/main instead of a stale origin/main.
This makes the claude-rebase workflow reliable for forks.
- **Bug Fixes**
- Add upstream remote in workflow and fetch upstream/main.
- Update pr-rebase command to prefer upstream/main, fallback to
origin/main for same-repo PRs.
- Document cross-repo remote setup and permissions in AGENTS.md.
<sup>Written for commit 52ea2741fa0397ee9e783c9a19b0d18cc54e388c.
Summary will update on new commits.</sup>
<!-- End of auto-generated description by cubic. -->
Co-authored-by:
Claude Opus 4.5 <noreply@anthropic.com>
正在显示
请
注册
或者
登录
后发表评论