Setup
First, configure your VibeKit instance with GitHub credentials using secrets:Cloning Repositories
The newcloneRepository method allows you to explicitly clone any GitHub repository:
Creating a PR
The basic way
After cloning a repository and generating code changes, you can create a pull request:Iterative changes with pushToBranch
For conversational UIs, users often want to make multiple iterations on the same feature. UsepushToBranch to continuously update the same branch without creating multiple pull requests:
Merging Pull Requests
Once a pull request has been reviewed and approved, you can programmatically merge it using themergePullRequest method:
Merge Methods
merge(default): Creates a merge commit with all commits from the feature branchsquash: Squashes all commits into a single commit before mergingrebase: Rebases the commits onto the base branch
Migration from withGithub
If you’re migrating from the oldwithGithub API, here are the key changes:
Before (deprecated)
After (new API)
Benefits of the New API
- Explicit Control: Repository cloning is now an explicit operation
- Public Repository Support: Clone public repositories without authentication
- Flexible Repository Management: Work with multiple repositories in the same session
- Cleaner Separation: GitHub operations are clearly separated from code generation
- Better Error Handling: More specific error messages for authentication issues

