Skip to content

feat(web): add merge PR action to git dropdown - #8

Merged
enisze merged 1 commit into
mainfrom
t3code/add-merge-pr-dropdown
Jul 30, 2026
Merged

enisze merged 1 commit into
mainfrom
t3code/add-merge-pr-dropdown

Conversation

@enisze

@enisze enisze commented Jul 30, 2026

Copy link
Copy Markdown
Owner

Summary

Adds a "Merge PR" item to the git actions dropdown (alongside Commit / Push / View PR), shown whenever there is an open pull request. Merging uses a merge commit and keeps the head branch.

The action runs through the existing source-control provider abstraction, so it works across all four providers:

Provider Merge command
GitHub gh pr merge <ref> --merge
GitLab glab mr merge <ref> --yes
Azure DevOps az repos pr update --id <id> --status completed --delete-source-branch false
Bitbucket POST .../pullrequests/{id}/merge (merge_commit, close_source_branch: false)

Changes by layer

  • Contracts: GitMergePullRequestResult + git.mergePullRequest RPC
  • Provider interface + all 4 impls: new mergeChangeRequest (plus CLI/API methods, registry wrappers)
  • Server: GitManager.mergePullRequest (fetch PR, merge, invalidate status caches), GitWorkflowService route, ws.ts handler (refreshes status after merge), auth scope
  • Client: gitEnvironment.mergePullRequest atom, useGitMergePullRequestAction hook, menu item + icon + disabled reasons + toast flow in GitActionsControl
  • Tests: updated mocks implementing the extended interfaces

Verification

  • Typecheck: 0 errors across all packages
  • Tests: affected server + client-runtime suites passing (86 + 113 + 15)

🤖 Generated with Claude Code

Adds a "Merge PR" item to the git actions dropdown alongside
Commit / Push / View PR, shown whenever there is an open pull request.
Merging uses a merge commit and keeps the head branch.

Wires the action through the existing source-control provider
abstraction so it works across all providers:
- GitHub: gh pr merge --merge
- GitLab: glab mr merge --yes
- Azure DevOps: az repos pr update --status completed --delete-source-branch false
- Bitbucket: pull request merge API (merge_commit, close_source_branch false)

Includes the new git.mergePullRequest RPC, GitManager/GitWorkflowService
methods, WS handler, auth scope, client atom + hook, and UI wiring.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@enisze
enisze merged commit b4d1d10 into main Jul 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant