Skip to content

Conversation

@joedanz
Copy link
Contributor

@joedanz joedanz commented Aug 20, 2025

Summary

Introduces a new mergePullRequest command to the VibeKit SDK, enabling programmatic merging of GitHub pull requests. This command completes the GitHub workflow capabilities alongside existing createPullRequest and pushToBranch commands.

Changes

  • Added mergePullRequest method to VibeKit SDK
  • Added TypeScript type definitions (MergePullRequestOptions, MergePullRequestResult)
  • Created API reference documentation
  • Updated GitHub integration documentation

Implementation

await vibekit.mergePullRequest({
  pullNumber: number,
  mergeMethod?: 'merge' | 'squash' | 'rebase',
  commitTitle?: string,
  commitMessage?: string
})

Key features:

  • Direct GitHub API integration (no agent/sandbox required)
  • Supports all three GitHub merge methods
  • Compliant with GitHub REST API v3 (2022-11-28)
  • Comprehensive error handling for common scenarios

Files Modified

  • packages/sdk/src/types.ts - Type definitions
  • packages/sdk/src/core/vibekit.ts - Core implementation
  • packages/sdk/src/index.ts - Public API exports
  • docs/api-reference/merge-pull-request.mdx - API documentation
  • docs/docs.json - Documentation navigation
  • docs/sdk/github-integration.mdx - Usage examples

Testing

  • Type checking: ✅ Passed
  • SDK build: ✅ Successful
  • Documentation: ✅ Complete

Breaking Changes

None

@vercel
Copy link

vercel bot commented Aug 20, 2025

@joedanz is attempting to deploy a commit to the Superagent Team on Vercel.

A member of the Team first needs to authorize it.

@homanp
Copy link
Collaborator

homanp commented Aug 21, 2025

@joedanz this looks good, one comment, would be cool if we could generate the commit messages automatically? Similar to createPullRequest

@joedanz
Copy link
Contributor Author

joedanz commented Aug 21, 2025

@joedanz this looks good, one comment, would be cool if we could generate the commit messages automatically? Similar to createPullRequest

Good call, will do!

@joedanz
Copy link
Contributor Author

joedanz commented Aug 21, 2025

Actually, this will be easier to complete after you merge #216 , that way we can keep similar patterns for Claude Code oAuth. Thanks!

@homanp
Copy link
Collaborator

homanp commented Aug 25, 2025

@joedanz thanks for this, merging!

@homanp homanp merged commit c82b799 into superagent-ai:main Aug 25, 2025
3 of 5 checks passed
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.

2 participants