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

Get a pull request

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

Copy page

Get a pull request

View MarkdownOpen in ChatGPTOpen in ClaudeOpen in PerplexityDownload OpenAPI

Returns a pull or merge request with Hacktron’s review of its head commit. Send either its url, or repository_id from GET /repos with its number.

review is null when the head commit has no review. Otherwise its status is in_progress or completed, and its scan_id reads the review’s findings with GET /scans/{id}/findings. To start a review, call POST /pull-requests/review.

Request

GET /pull-requests/details

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

Query parameters

ParameterDescription
url
string
The pull or merge request’s web link. Give this, or repository_id and number.
repository_id
string (uuid)
Id from the repository list.
number
number
The pull or merge request number in that repository.

Responses

200 OK

FieldDescription
repository_id
string (uuid), required
Id from the repository list.
repository
string, required
Repository full name.
provider
string, required
One of github, gitlab, bitbucket, or azure.
number
number, required
title
string, required
url
string, required
Web link to the pull request.
author
string, required, nullable
The author’s name on the provider.
is_yours
boolean, required
Whether the caller opened it, matched through their linked source control accounts.
draft
boolean, required
source_branch
string, required
target_branch
string, required
updated_at
string, required, nullable
Last update, or creation where the provider reports no update time.
state
string, required
One of open, closed, or merged.
head_sha
string, required, nullable
The commit at the head of the pull request; null when the provider reports none, such as a closed pull request whose fork is gone.
review
object, required, nullable
Hacktron’s review of the head commit, running or finished; null when it has none.
review.scan_id
string (uuid), required, nullable
Scan id, for the scans routes.
review.task_id
string, required
review.status
string, required
One of in_progress or completed.

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.

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]