Create PRs from Source Control (#2478)
* Create PRs directly from Source Control - Replace the modal flow with an inline PR composer in the sidebar - Keep PR creation state and validation scoped per worktree - Rename the recovery action to clarify it only pushes before creating PRs * Clean up fork PR remotes after worktree deletion - Track Orca-created push target remotes in worktree metadata - Reuse ownership markers when later worktrees share the same fork remote - Fetch only the selected PR base instead of every remote before drafting PRs - Mirror local branch cleanup for SSH worktree deletion * Stabilize pull request creation flow - Keep PR actions and composer fields locked while generation or creation is in flight - Refresh git status, branch comparison, and history after remote actions settle - Disable push-only actions on diverged branches so users sync first * Make PR context generation read-only - Stop rebasing or probing HEAD before collecting PR draft context - Allow git operations on known repo roots without refreshing worktree cache Co-authored-by: Orca <help@stably.ai> * fix: address review findings --------- Co-authored-by: Orca <help@stably.ai>
This commit is contained in:
@@ -239,7 +239,8 @@ export class RuntimeGitCommands {
|
||||
async pushRuntimeGit(
|
||||
worktreeSelector: string,
|
||||
publish?: boolean,
|
||||
pushTarget?: GitPushTarget
|
||||
pushTarget?: GitPushTarget,
|
||||
forceWithLease?: boolean
|
||||
): Promise<{ ok: true }> {
|
||||
const target = await this.host.resolveRuntimeGitTarget(worktreeSelector)
|
||||
const provider = target.connectionId ? getSshGitProvider(target.connectionId) : null
|
||||
@@ -247,10 +248,14 @@ export class RuntimeGitCommands {
|
||||
if (!provider) {
|
||||
throw new Error(SSH_GIT_PROVIDER_UNAVAILABLE_MESSAGE)
|
||||
}
|
||||
await provider.pushBranch(target.worktree.path, publish === true, pushTarget)
|
||||
await provider.pushBranch(target.worktree.path, publish === true, pushTarget, {
|
||||
forceWithLease: forceWithLease === true
|
||||
})
|
||||
return { ok: true }
|
||||
}
|
||||
await gitPush(target.worktree.path, publish === true, pushTarget)
|
||||
await gitPush(target.worktree.path, publish === true, pushTarget, {
|
||||
forceWithLease: forceWithLease === true
|
||||
})
|
||||
return { ok: true }
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user