OpenAI is partnering with Hacktron to find vulnerabilities in its systems. Read the announcement.

Skip to content Hacktron Sign in [S]
Hacktron Sign in [S] Customers Docs Contact Sign in

Review a pull request

1 min
, View, ChatGPT, Claude, Perplexity, OpenAPI

Copy page

Review a pull request

View MarkdownOpen in ChatGPTOpen in ClaudeOpen in PerplexityDownload OpenAPI

Starts a review of a pull or merge request, as if a repository member commented @hacktronai review on it. The review runs on the head commit and posts on the pull request as your PR review settings say: posts_comments and posts_check_status report what it will post. You need the member role or above.

When the head commit already has a review, Hacktron returns that one instead of starting another, with status set to in_progress or already_reviewed.

  • A closed or merged pull request returns 409 Conflict.
  • A review that can’t run returns 422 Unprocessable Entity, with the reason in message. You can retry a failed start.

Follow the review with GET /scans/{id}/status, using scan_id.

Request

POST /pull-requests/review

Send an API key with the write scope in the X-Api-Key header.

Body

A required application/json body.

FieldDescription
pr_url
string, required
The pull or merge request’s web link.

Responses

200 OK

FieldDescription
status
string, required
started, or in_progress / already_reviewed when a review of the head commit already exists. One of started, in_progress, or already_reviewed.
scan_id
string (uuid), required, nullable
Scan id, for the scans routes.
task_id
string, required
repository
string, required
number
number, required
url
string, required
posts_comments
boolean, required
Whether findings are posted as comments on the pull request (the organisation’s scm_comments_enabled).
posts_check_status
boolean, required
Whether the review shows as a check or status on the pull request (scm_check_statuses_enabled).

400 Bad Request

Not a pull request link, a repository not enabled for Hacktron, or a GitHub repository connected with a personal access token.

404 Not Found

The pull request, or its repository in the organization, wasn’t found.

409 Conflict

The pull request is closed or merged.

422 Unprocessable Entity

The review could not run; the message says why. A failed start can be retried.

503 Service Unavailable

The repository’s provider could not be read; try again later.

[↓] [↑] [enter] to visit
Menu
[M]
Next in menu
[J]
Previous in menu
[K]
Find
[F]
Ask
[A]
Sign in
[S]
Copy page
[C]
Listen
[L]
Justification
[R]
Language
[G]
Dark mode
[D]
High contrast
[H]
Shortcuts
[I]
Close
[Esc]