Turn PR reviews on or off
Copy page
Turn PR reviews on or off
Turns automatic pull and merge request reviews on for the repositories in enable and off for the repositories in disable. Use repository IDs from GET /repos, for any supported provider. Each list holds up to 100 IDs per request. Only organisation admins can call it.
Before you turn reviews on for a repository, give Hacktron access to it from Repositories in Hacktron.
If one repository fails, Hacktron carries on with the others. The response counts the repositories that changed in
processedand lists each failure with its reason infailedRepositories.webhookPendinglists the enabled repositories whose provider webhook is still waiting to be registered. Reviews begin once the webhook is registered.
Request
POST /repos/pr-reviews
Send an API key
with the write scope
in the X-Api-Key header.
Headers
| Parameter | Description |
|---|---|
X-Organization-Id string, required | Organization ID. |
Body
A required application/json body.
| Field | Description |
|---|---|
enable array of string (uuid), required | Ids from the repository list of the repositories to turn on. |
disable array of string (uuid), required | Ids from the repository list of the repositories to turn off. |
Responses
201 Created
| Field | Description |
|---|---|
processed number, required | Keys applied. |
failed number, required | Keys that failed. |
failedRepositories array of object, required | Keys that failed, with the reason. |
failedRepositories[]. string, required | The key the request named. |
failedRepositories[]. string, required | Why the key was not applied. |
webhookPending array of string, required | Keys turned on whose provider webhook could not be registered. |