Done. The fix adds two lines to the GitCreatePR action in actions/index.ts: (#1911)

1. Fetches the workspace repos via `attemptsApi.getRepos(workspaceId)`
2. Finds the specific repo and passes its `target_branch` to `CreatePRDialog.show()`

This matches the pattern already used by the `GitRebase` action in the same file. Now when you create a PR from the workspaces (ui-new) layout, the base branch will correctly default to the workspace's target branch instead of the main repo's currently checked-out branch.
This commit is contained in:
Louis Knight-Webb
2026-01-10 12:01:49 +00:00
committed by GitHub
parent e2fad0e10c
commit 4120678cf7

View File

@@ -605,6 +605,9 @@ export const Actions = {
const workspace = getWorkspaceFromCache(ctx.queryClient, workspaceId);
const task = await tasksApi.getById(workspace.task_id);
const repos = await attemptsApi.getRepos(workspaceId);
const repo = repos.find((r) => r.id === repoId);
const result = await CreatePRDialog.show({
attempt: workspace,
task: {
@@ -614,6 +617,7 @@ export const Actions = {
executor: '',
},
repoId,
targetBranch: repo?.target_branch,
});
if (!result.success && result.error) {