List pull requests
Returns open pull and merge requests, most recently updated first. Send repository_id, from GET /repos, to list one repository. Without it, the list covers up to 20 of the organisation’s enabled repositories, those with automatic reviews on first, and truncated is true when the organisation has more.
mine=truekeeps the pull requests you opened, matched through the source control accounts you linked to Hacktron. With no account linked, nothing matches.limitcaps the list across all repositories. It isn’t paginated, so narrow it withrepository_idormine.errorsnames the repositories or providers that couldn’t be read, so the list may be incomplete when it isn’t empty. Repositories Hacktron can’t review, such as GitHub repositories connected with a personal access token, are left out without an entry.
Look one up with GET /pull-requests/details to see Hacktron’s review of it.
Request
GET /pull-requests
Send an API key with the read scope in the X-Api-Key header.
Query parameters
| Parameter | Description |
|---|---|
repository_idstring (uuid) | Id from the repository list. Without it, open pull requests across the organisation’s enabled repositories are listed. |
mineboolean | Only pull requests the caller opened, among each repository’s most recently updated open pull requests, matched through the caller’s source control accounts linked to Hacktron; with none linked nothing matches. Default false. |
limitnumber | At most this many, across repositories. Not paginated: narrow with repository_id or mine. Default 20. At least 1. At most 50. |
Responses
200 OK
| Field | Description |
|---|---|
dataarray of object, required | Open pull requests, most recently updated first. |
data[].string (uuid), required | Id from the repository list. |
data[].string, required | Repository full name. |
data[].string, required | One of github, gitlab, bitbucket, or azure. |
data[].number, required | |
data[].string, required | |
data[].string, required | Web link to the pull request. |
data[].string, required, nullable | The author’s name on the provider. |
data[].boolean, required | Whether the caller opened it, matched through their linked source control accounts. |
data[].boolean, required | |
data[].string, required | |
data[].string, required | |
data[].string, required, nullable | Last update, or creation where the provider reports no update time. |
errorsarray of string, required | Repositories, or whole providers, whose pull requests could not be read; when not empty the list may be incomplete. Repositories Hacktron can’t review, such as GitHub ones connected with a personal access token, are left out without an entry. |
truncatedboolean, required | True when the organisation has more enabled repositories than one listing searches; pass repository_id to list a specific one. |
400 Bad Request
The repository isn’t enabled for Hacktron, or its provider has no PR reviews here.
404 Not Found
The repository isn’t connected to the organisation.
503 Service Unavailable
The repository’s provider could not be read; try again later.