A provider is the source of merge proposal data in CRH — it fetches everything the AI agent needs to perform a code review. The Launchpad provider connects to the Launchpad API and retrieves merge proposal metadata, preview diffs, diff content, inline and general comments, and CI status. It also clones the source branch viaDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/goulinkh/code-review-harness/llms.txt
Use this file to discover all available pages before exploring further.
isomorphic-git so the agent can inspect file history. Only git merge proposals are supported; Bazaar merge proposals are rejected at construction time.
Installation
The provider is available as a standalone package if you are using CRH programmatically:Configuration
The provider accepts aLaunchpadProviderOptions object:
| Field | Type | Required | Description |
|---|---|---|---|
url | string | Yes | Launchpad API merge proposal URL (see below). |
api | object | No | Pre-constructed LaunchpadApi instance. Overrides all OAuth options when provided. |
gitdir | string | No | Path for the local git clone. Defaults to a temporary directory created with mkdtempSync. |
accessToken | string | No | OAuth access token. Falls back to the LP_ACCESS_TOKEN environment variable. |
accessSecret | string | No | OAuth access secret. Falls back to the LP_ACCESS_SECRET environment variable. |
consumerKey | string | No | OAuth consumer key. Falls back to LP_CONSUMER_KEY, then "crh". |
The url field
The url must be a Launchpad API merge proposal URL, not the web UI URL. The two formats look like this:
| Format | Example |
|---|---|
| API URL ✓ | https://api.launchpad.net/devel/~user/+git/repo/+merge/123 |
| Web URL ✗ | https://code.launchpad.net/~user/+git/repo/+merge/123 |
/^https:\/\/api\.launchpad\.net\/devel\/.+\/\+git\/.+\/\+merge\/\d+\/?$/. Passing a web UI URL or a Bazaar MP URL throws an UnsupportedRepoTypeError.
OAuth authentication
The provider uses OAuth 1.0a HMAC-SHA1 to authenticate against the Launchpad API. You can supply credentials in two ways:Environment variables (recommended)
Export the following variables before running
crh:LP_CONSUMER_KEY defaults to "crh" when omitted.What the provider fetches
When CRH runs a review session, the Launchpad provider retrieves:Metadata
Title, description, commit message, author, source branch, and target branch from the merge proposal resource.
Preview diffs
The list of preview diff rounds for the MP, sorted by creation time.
Diff content
The raw unified diff for a given preview diff ID, with a fallback to the web URL when the API link is unavailable.
Comments
Both inline comments (keyed by numbered-diff line) and general MP-level comments for a given preview diff round.
CI status
Returned as an empty checks array in v1. CI integration is not yet implemented.
Git clone
Clones the source branch from
git.launchpad.net via isomorphic-git into the configured (or temp) gitdir.Usage
CLI
Pass--provider launchpad and the API URL to --pr:
Programmatic
createLaunchpadProvider is impure — it may read environment variables for OAuth config and creates a temporary git directory when gitdir is not supplied.