Coming Soon — The GitHub SDK is currently in development. Connect your GitHub account now in the Morph Dashboard to be ready when it launches.
Quick Start
Why Use the GitHub SDK?
The GitHub SDK is designed for agent workflows — particularly combining GitHub context with browser automation:- Get PR context (diff, files, metadata) to understand what changed
- Find preview deployments (Vercel, Netlify, Cloudflare) for a PR
- Post test results as comments with videos/screenshots
- Set CI status with check runs
Setup
1. Connect GitHub
Go to morphllm.com/dashboard/integrations/github and install the Morph GitHub App on your account or organization.2. Use the SDK
Core Operations
List Installations
See which GitHub accounts are connected to your Morph account:List Repositories
List repos accessible to a specific installation:Get Pull Request Context
Theget method returns the full PR context including the unified diff and changed files:
Find Preview Deployments
Get deployments for a PR’s head SHA to find preview URLs:Post Comments
Post test results, feedback, or status updates to PRs:Manage Check Runs
Create and update GitHub check runs for CI status:Full Example: PR Preview Testing
Combine GitHub SDK with Browser automation for end-to-end PR testing:Using with Multiple Installations
If you have multiple GitHub accounts connected, specify the installation ID per-request:API Reference
Installations
| Method | Description |
|---|---|
installations.list() | List all GitHub installations for your account |
installations.get(id) | Get details of a specific installation |
Repositories
| Method | Description |
|---|---|
repos.list({ installationId }) | List repositories accessible to an installation |
Pull Requests
| Method | Description |
|---|---|
pullRequests.list({ owner, repo, state? }) | List pull requests in a repository |
pullRequests.get({ owner, repo, number }) | Get a PR with full context (diff, files) |
Deployments
| Method | Description |
|---|---|
deployments.list({ owner, repo, sha?, environment? }) | List deployments for a repository |
Comments
| Method | Description |
|---|---|
comments.list({ owner, repo, pr }) | List comments on a pull request |
comments.create({ owner, repo, pr, body }) | Create a comment |
comments.update({ owner, repo, commentId, body }) | Update an existing comment |
comments.delete({ owner, repo, commentId }) | Delete a comment |
Check Runs
| Method | Description |
|---|---|
checkRuns.create({ owner, repo, sha, name, status, title?, summary? }) | Create a check run |
checkRuns.update({ owner, repo, checkRunId, conclusion?, title?, summary?, text? }) | Update a check run |
Types
Error Handling
FAQ
How do I connect GitHub?
How do I connect GitHub?
Go to morphllm.com/dashboard/integrations/github and install the Morph GitHub App on your account or organization. You can select specific repositories or grant access to all repos.
Can I use this with organization repos?
Can I use this with organization repos?
Yes! When you install the GitHub App, you can choose to install it on your personal account or any organization you have admin access to. Each installation appears separately in
installations.list().Is my GitHub token stored securely?
Is my GitHub token stored securely?
The SDK never exposes your GitHub installation tokens. All GitHub API calls are proxied through Morph’s servers, where tokens are stored securely. You only use your Morph API key.
What permissions does the GitHub App need?
What permissions does the GitHub App need?
The Morph GitHub App requests:
- Read access to code, metadata, and deployments
- Write access to issues/PRs (for comments) and checks (for CI status)
How do I use this with Browser automation?
How do I use this with Browser automation?
The GitHub SDK is designed to work seamlessly with Browser automation:
- Get PR context with
pullRequests.get() - Pass the
difftobrowser.createTask()for intelligent testing - Post results with
comments.create()andcheckRuns.update()