Start a PR analysis run

Start a Hud PR analysis of a GitHub pull request in a repository connected to Hud.

Identify the pull request with pr_url, or with repository and pr_number.

  • A regular run (dry_run: false) posts its comments on the pull request, as a run Hud starts on push does, and replaces the pull request's run in progress.
  • A dry run (dry_run: true) posts nothing to GitHub and leaves the pull request's runs alone. Read its comments with GET /pr-analysis/runs/{run_id}.

Both run on your account's model integration; with none configured the request fails with 422 model_credentials_missing.

Send an Idempotency-Key header to make retries safe: the same key returns the run it started (deduplicated: true), and reusing it for another pull request or mode returns 409 idempotency_key_reused.

Auth: requires pr-analysis:run (operator keys).

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Body Params
string

GitHub pull request URL, e.g. https://github.com/acme/payments/pull/412

string
^[A-Za-z0-9_.-]+\/[A-Za-z0-9_.-]+$

owner/name of the repository. Send with pr_number instead of pr_url.

integer
≤ 9007199254740991

Pull request number

boolean
Defaults to false

Analyze the pull request without posting anything to GitHub. The run uses your account’s model integration.

string
^[0-9a-f]{40}$

Refuse the run with 409 head_sha_mismatch when the pull request head is no longer this commit

Headers
string
^[A-Za-z0-9._:-]{1,128}$

Optional, 1–128 characters from A-Z a-z 0-9 . _ : -. Repeating a request with the same key returns the run the first one started.

Responses

Language
Credentials
Header
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json