Repository navigation
Open, track and merge pull requests on Bitbucket and Azure DevOps repos - #1678
Conversation
Solenta-Message-Id: f8cc274d-8e30-4420-88dc-ef991dfd1621
Solenta-Message-Id: 8b8dca0d-2630-4576-aa6f-90f594baad5c
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 75a85ace11
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| const forge = prForge(originUrl); | ||
| if (forge) { | ||
| // ponytail: non-gh forges always squash-merge; method/auto are gh-only. | ||
| await forge.api.mergePr(cwd, forge.remote, info.number); |
There was a problem hiding this comment.
Honor auto-merge before dispatching to non-GitHub forges
When a new Bitbucket or Azure DevOps PR has pending checks, NextGitActionButton.tsx:596-605 offers “Auto-merge” and calls onPrMerge({ auto: true }), but this dispatch drops opts.auto and immediately invokes the provider's merge operation. In particular, Bitbucket's merge endpoint merges immediately unless a merge queue happens to be active, so clicking the button can merge while checks are still running. Hide auto-merge for backends without that capability or implement provider-specific deferred merging.
Useful? React with 👍 / 👎.
| const repo = await existing?.git?.repoInfo?.({ threadId: id }).catch(() => null); | ||
| const kind = repo?.ok && repo.forge ? repo.forge : "github"; | ||
| if (threadRef.current === id) setGithub(forgeReadiness(next, kind)); |
There was a problem hiding this comment.
Accept Azure DevOps PAT authentication before gating actions
For an Azure origin, this now gates every PR action on the Azure provider result, but probeAzure first runs az account show and reports unauthenticated when that fails (electron/sourceControl.js:440-479). Users authenticated through az devops login or AZURE_DEVOPS_EXT_PAT therefore get a disabled Create PR button even though the newly added az repos pr backend can authenticate successfully. Microsoft explicitly documents both PAT methods, including running commands with AZURE_DEVOPS_EXT_PAT without az login; the readiness probe needs to recognize them rather than requiring an Azure account session. Azure DevOps PAT authentication documentation
Useful? React with 👍 / 👎.
Projects on Bitbucket Cloud or Azure DevOps can now use the same PR flow as GitHub and GitLab: open a PR, see its status and CI in the thread header, and squash-merge it. The planboard and issues stay GitHub/GitLab only, as #456 scoped. Closes #456.
Changes
SOLENTA_BITBUCKET_*tokens that Settings → Source Control already probes. Checks come from commit statuses.az repos pr(the azure-devops extension), matching the existing Settings probe. Recognizesdev.azure.com,*.visualstudio.com, ssh v3 and the/{org}/_git/{repo}short form. Checks come from branch-policy evaluations.prForgeinworktrees-pr.jsfor status, checks, merge, background refresh and create. PR list and checkout stay GitHub/GitLab.ghwasn't signed in, whatever forge the repo is on. That blocked GitLab users and would have blocked every Bitbucket user.git.repoInfonow reports the origin's forge, and the button checks that provider's readiness.Verification
npm run test:electron(CODER_* unset): 4762 pass, 3 fail. All 3 were tests that treatedbitbucket.orgas "not a forge" or matched the old error text; they are updated here and pass.electron/test/bitbucket-azure.test.js(12 tests) covers remote parsing, dispatch, create/view/checks/merge, the create-race fallback and auth errors, against a stubbed fetch and a fakeaz.ghmissing keeps Create PR enabled, and is blocked with the Bitbucket hint when its token is missing.npm run typecheckpasses.az devopsdocs.Notes for reviewers
--opt=value, so text starting with-isn't read as a flag.azisaz.cmd, whichexecFilecan't launch. The existing Settings probe has the same limit.claude-opus-5-5 via Claude Code
🤖 Generated with Claude Code