Skip to main content
Beta — The GitHub SDK is available in beta. Expect occasional rough edges, and please email founders@MorphLM with any bugs or issues.
Access your GitHub repositories, pull requests, and deployments through your Morph API key. Perfect for building PR preview testing workflows, code review automation, and CI/CD integrations.

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. installationId is required unless you set a default in the client config.

Get Pull Request Context

The get 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:
Or set a default installation in the client config:

API Reference

Installations

Repositories

Pull Requests

Deployments

Comments

Check Runs

Types

Error Handling

FAQ

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.
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().
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.
The Morph GitHub App requests:
  • Read access to code, metadata, and deployments
  • Write access to issues/PRs (for comments) and checks (for CI status)
We request the minimum permissions needed for PR testing workflows.
The GitHub SDK is designed to work seamlessly with Browser automation:
  1. Get PR context with pullRequests.get()
  2. Pass the diff to browser.createTask() for intelligent testing
  3. Post results with comments.create() and checkRuns.update()
See the Full Example above.