curl --request PATCH \
--url https://api.hacktron.ai/v1/pr-review-settings \
--header 'Content-Type: application/json' \
--header 'X-Api-Key: <api-key>' \
--header 'X-Organization-Id: <x-organization-id>' \
--data '
{
"scm_comments_enabled": true,
"scm_system_comments_enabled": true,
"scan_include_branches": [
"main",
"**/release/**"
],
"scan_exclude_branches": [
"**/release/legacy/**"
],
"scan_include_labels": [
"feature",
"bugfix"
],
"scan_exclude_labels": [
"wip",
"no-scan"
],
"scan_include_authors": [
"alice",
"bob"
],
"scan_exclude_authors": [
"dependabot[bot]",
"renovate[bot]",
"*-bot"
],
"scan_include_keywords": [
"release",
"security"
],
"scan_exclude_keywords": [
"[exclude hacktron]",
"wip"
]
}
'import requests
url = "https://api.hacktron.ai/v1/pr-review-settings"
payload = {
"scm_comments_enabled": True,
"scm_system_comments_enabled": True,
"scan_include_branches": ["main", "**/release/**"],
"scan_exclude_branches": ["**/release/legacy/**"],
"scan_include_labels": ["feature", "bugfix"],
"scan_exclude_labels": ["wip", "no-scan"],
"scan_include_authors": ["alice", "bob"],
"scan_exclude_authors": ["dependabot[bot]", "renovate[bot]", "*-bot"],
"scan_include_keywords": ["release", "security"],
"scan_exclude_keywords": ["[exclude hacktron]", "wip"]
}
headers = {
"X-Organization-Id": "<x-organization-id>",
"X-Api-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {
'X-Organization-Id': '<x-organization-id>',
'X-Api-Key': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
scm_comments_enabled: true,
scm_system_comments_enabled: true,
scan_include_branches: ['main', '**/release/**'],
scan_exclude_branches: ['**/release/legacy/**'],
scan_include_labels: ['feature', 'bugfix'],
scan_exclude_labels: ['wip', 'no-scan'],
scan_include_authors: ['alice', 'bob'],
scan_exclude_authors: ['dependabot[bot]', 'renovate[bot]', '*-bot'],
scan_include_keywords: ['release', 'security'],
scan_exclude_keywords: ['[exclude hacktron]', 'wip']
})
};
fetch('https://api.hacktron.ai/v1/pr-review-settings', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.hacktron.ai/v1/pr-review-settings",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'scm_comments_enabled' => true,
'scm_system_comments_enabled' => true,
'scan_include_branches' => [
'main',
'**/release/**'
],
'scan_exclude_branches' => [
'**/release/legacy/**'
],
'scan_include_labels' => [
'feature',
'bugfix'
],
'scan_exclude_labels' => [
'wip',
'no-scan'
],
'scan_include_authors' => [
'alice',
'bob'
],
'scan_exclude_authors' => [
'dependabot[bot]',
'renovate[bot]',
'*-bot'
],
'scan_include_keywords' => [
'release',
'security'
],
'scan_exclude_keywords' => [
'[exclude hacktron]',
'wip'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-Api-Key: <api-key>",
"X-Organization-Id: <x-organization-id>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.hacktron.ai/v1/pr-review-settings"
payload := strings.NewReader("{\n \"scm_comments_enabled\": true,\n \"scm_system_comments_enabled\": true,\n \"scan_include_branches\": [\n \"main\",\n \"**/release/**\"\n ],\n \"scan_exclude_branches\": [\n \"**/release/legacy/**\"\n ],\n \"scan_include_labels\": [\n \"feature\",\n \"bugfix\"\n ],\n \"scan_exclude_labels\": [\n \"wip\",\n \"no-scan\"\n ],\n \"scan_include_authors\": [\n \"alice\",\n \"bob\"\n ],\n \"scan_exclude_authors\": [\n \"dependabot[bot]\",\n \"renovate[bot]\",\n \"*-bot\"\n ],\n \"scan_include_keywords\": [\n \"release\",\n \"security\"\n ],\n \"scan_exclude_keywords\": [\n \"[exclude hacktron]\",\n \"wip\"\n ]\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("X-Organization-Id", "<x-organization-id>")
req.Header.Add("X-Api-Key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://api.hacktron.ai/v1/pr-review-settings")
.header("X-Organization-Id", "<x-organization-id>")
.header("X-Api-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"scm_comments_enabled\": true,\n \"scm_system_comments_enabled\": true,\n \"scan_include_branches\": [\n \"main\",\n \"**/release/**\"\n ],\n \"scan_exclude_branches\": [\n \"**/release/legacy/**\"\n ],\n \"scan_include_labels\": [\n \"feature\",\n \"bugfix\"\n ],\n \"scan_exclude_labels\": [\n \"wip\",\n \"no-scan\"\n ],\n \"scan_include_authors\": [\n \"alice\",\n \"bob\"\n ],\n \"scan_exclude_authors\": [\n \"dependabot[bot]\",\n \"renovate[bot]\",\n \"*-bot\"\n ],\n \"scan_include_keywords\": [\n \"release\",\n \"security\"\n ],\n \"scan_exclude_keywords\": [\n \"[exclude hacktron]\",\n \"wip\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.hacktron.ai/v1/pr-review-settings")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["X-Organization-Id"] = '<x-organization-id>'
request["X-Api-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"scm_comments_enabled\": true,\n \"scm_system_comments_enabled\": true,\n \"scan_include_branches\": [\n \"main\",\n \"**/release/**\"\n ],\n \"scan_exclude_branches\": [\n \"**/release/legacy/**\"\n ],\n \"scan_include_labels\": [\n \"feature\",\n \"bugfix\"\n ],\n \"scan_exclude_labels\": [\n \"wip\",\n \"no-scan\"\n ],\n \"scan_include_authors\": [\n \"alice\",\n \"bob\"\n ],\n \"scan_exclude_authors\": [\n \"dependabot[bot]\",\n \"renovate[bot]\",\n \"*-bot\"\n ],\n \"scan_include_keywords\": [\n \"release\",\n \"security\"\n ],\n \"scan_exclude_keywords\": [\n \"[exclude hacktron]\",\n \"wip\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"scm_comments_enabled": true,
"scm_system_comments_enabled": true,
"fail_on_severity": "critical",
"scan_include_branches": [
"main",
"**/release/**"
],
"scan_exclude_branches": [
"**/release/legacy/**"
],
"scan_include_labels": [
"feature",
"bugfix"
],
"scan_exclude_labels": [
"wip",
"no-scan"
],
"scan_include_authors": [
"alice",
"bob"
],
"scan_exclude_authors": [
"dependabot[bot]",
"renovate[bot]",
"*-bot"
],
"scan_include_keywords": [
"release",
"security"
],
"scan_exclude_keywords": [
"[exclude hacktron]",
"wip"
]
}Update PR review settings
Change how PR reviews behave across your organization.
curl --request PATCH \
--url https://api.hacktron.ai/v1/pr-review-settings \
--header 'Content-Type: application/json' \
--header 'X-Api-Key: <api-key>' \
--header 'X-Organization-Id: <x-organization-id>' \
--data '
{
"scm_comments_enabled": true,
"scm_system_comments_enabled": true,
"scan_include_branches": [
"main",
"**/release/**"
],
"scan_exclude_branches": [
"**/release/legacy/**"
],
"scan_include_labels": [
"feature",
"bugfix"
],
"scan_exclude_labels": [
"wip",
"no-scan"
],
"scan_include_authors": [
"alice",
"bob"
],
"scan_exclude_authors": [
"dependabot[bot]",
"renovate[bot]",
"*-bot"
],
"scan_include_keywords": [
"release",
"security"
],
"scan_exclude_keywords": [
"[exclude hacktron]",
"wip"
]
}
'import requests
url = "https://api.hacktron.ai/v1/pr-review-settings"
payload = {
"scm_comments_enabled": True,
"scm_system_comments_enabled": True,
"scan_include_branches": ["main", "**/release/**"],
"scan_exclude_branches": ["**/release/legacy/**"],
"scan_include_labels": ["feature", "bugfix"],
"scan_exclude_labels": ["wip", "no-scan"],
"scan_include_authors": ["alice", "bob"],
"scan_exclude_authors": ["dependabot[bot]", "renovate[bot]", "*-bot"],
"scan_include_keywords": ["release", "security"],
"scan_exclude_keywords": ["[exclude hacktron]", "wip"]
}
headers = {
"X-Organization-Id": "<x-organization-id>",
"X-Api-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {
'X-Organization-Id': '<x-organization-id>',
'X-Api-Key': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
scm_comments_enabled: true,
scm_system_comments_enabled: true,
scan_include_branches: ['main', '**/release/**'],
scan_exclude_branches: ['**/release/legacy/**'],
scan_include_labels: ['feature', 'bugfix'],
scan_exclude_labels: ['wip', 'no-scan'],
scan_include_authors: ['alice', 'bob'],
scan_exclude_authors: ['dependabot[bot]', 'renovate[bot]', '*-bot'],
scan_include_keywords: ['release', 'security'],
scan_exclude_keywords: ['[exclude hacktron]', 'wip']
})
};
fetch('https://api.hacktron.ai/v1/pr-review-settings', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.hacktron.ai/v1/pr-review-settings",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'scm_comments_enabled' => true,
'scm_system_comments_enabled' => true,
'scan_include_branches' => [
'main',
'**/release/**'
],
'scan_exclude_branches' => [
'**/release/legacy/**'
],
'scan_include_labels' => [
'feature',
'bugfix'
],
'scan_exclude_labels' => [
'wip',
'no-scan'
],
'scan_include_authors' => [
'alice',
'bob'
],
'scan_exclude_authors' => [
'dependabot[bot]',
'renovate[bot]',
'*-bot'
],
'scan_include_keywords' => [
'release',
'security'
],
'scan_exclude_keywords' => [
'[exclude hacktron]',
'wip'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-Api-Key: <api-key>",
"X-Organization-Id: <x-organization-id>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.hacktron.ai/v1/pr-review-settings"
payload := strings.NewReader("{\n \"scm_comments_enabled\": true,\n \"scm_system_comments_enabled\": true,\n \"scan_include_branches\": [\n \"main\",\n \"**/release/**\"\n ],\n \"scan_exclude_branches\": [\n \"**/release/legacy/**\"\n ],\n \"scan_include_labels\": [\n \"feature\",\n \"bugfix\"\n ],\n \"scan_exclude_labels\": [\n \"wip\",\n \"no-scan\"\n ],\n \"scan_include_authors\": [\n \"alice\",\n \"bob\"\n ],\n \"scan_exclude_authors\": [\n \"dependabot[bot]\",\n \"renovate[bot]\",\n \"*-bot\"\n ],\n \"scan_include_keywords\": [\n \"release\",\n \"security\"\n ],\n \"scan_exclude_keywords\": [\n \"[exclude hacktron]\",\n \"wip\"\n ]\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("X-Organization-Id", "<x-organization-id>")
req.Header.Add("X-Api-Key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://api.hacktron.ai/v1/pr-review-settings")
.header("X-Organization-Id", "<x-organization-id>")
.header("X-Api-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"scm_comments_enabled\": true,\n \"scm_system_comments_enabled\": true,\n \"scan_include_branches\": [\n \"main\",\n \"**/release/**\"\n ],\n \"scan_exclude_branches\": [\n \"**/release/legacy/**\"\n ],\n \"scan_include_labels\": [\n \"feature\",\n \"bugfix\"\n ],\n \"scan_exclude_labels\": [\n \"wip\",\n \"no-scan\"\n ],\n \"scan_include_authors\": [\n \"alice\",\n \"bob\"\n ],\n \"scan_exclude_authors\": [\n \"dependabot[bot]\",\n \"renovate[bot]\",\n \"*-bot\"\n ],\n \"scan_include_keywords\": [\n \"release\",\n \"security\"\n ],\n \"scan_exclude_keywords\": [\n \"[exclude hacktron]\",\n \"wip\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.hacktron.ai/v1/pr-review-settings")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["X-Organization-Id"] = '<x-organization-id>'
request["X-Api-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"scm_comments_enabled\": true,\n \"scm_system_comments_enabled\": true,\n \"scan_include_branches\": [\n \"main\",\n \"**/release/**\"\n ],\n \"scan_exclude_branches\": [\n \"**/release/legacy/**\"\n ],\n \"scan_include_labels\": [\n \"feature\",\n \"bugfix\"\n ],\n \"scan_exclude_labels\": [\n \"wip\",\n \"no-scan\"\n ],\n \"scan_include_authors\": [\n \"alice\",\n \"bob\"\n ],\n \"scan_exclude_authors\": [\n \"dependabot[bot]\",\n \"renovate[bot]\",\n \"*-bot\"\n ],\n \"scan_include_keywords\": [\n \"release\",\n \"security\"\n ],\n \"scan_exclude_keywords\": [\n \"[exclude hacktron]\",\n \"wip\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"scm_comments_enabled": true,
"scm_system_comments_enabled": true,
"fail_on_severity": "critical",
"scan_include_branches": [
"main",
"**/release/**"
],
"scan_exclude_branches": [
"**/release/legacy/**"
],
"scan_include_labels": [
"feature",
"bugfix"
],
"scan_exclude_labels": [
"wip",
"no-scan"
],
"scan_include_authors": [
"alice",
"bob"
],
"scan_exclude_authors": [
"dependabot[bot]",
"renovate[bot]",
"*-bot"
],
"scan_include_keywords": [
"release",
"security"
],
"scan_exclude_keywords": [
"[exclude hacktron]",
"wip"
]
}null to disable fail_on_severity or clear a filter.
write. Role: organization admin.*, **, ?, {a,b}) and are case-insensitive. Each filter holds up to 50 entries.Authorizations
Headers
Organization ID
Body
Whether Hacktron publishes comments and finding details to connected source control pull and merge requests
Whether Hacktron posts system comments such as skipped reviews, usage limits, and configuration warnings. Defaults to true. Requires scm_comments_enabled.
Org-wide default fail_on severity threshold for PR/MR checks. A repo's .hacktron/config.yaml fail_on.severity overrides this. Send null to disable.
critical, high, medium, low, info Org-wide default target branch patterns to scan PRs/MRs for (null = all branches). Glob patterns (*, **, ?, {a,b}), case-insensitive. A repo's .hacktron/config.yaml include.branches overrides this.
["main", "**/release/**"]
Org-wide default target branch patterns to exclude from PR/MR scans (null = none). Takes precedence over scan_include_branches. A repo's .hacktron/config.yaml exclude.branches overrides this.
["**/release/legacy/**"]
Org-wide default labels to require on PRs/MRs for scanning (null = any). A repo's .hacktron/config.yaml include.labels overrides this.
["feature", "bugfix"]
Org-wide default labels to exclude PR/MR scans for (null = none). Takes precedence over scan_include_labels. A repo's .hacktron/config.yaml exclude.labels overrides this.
["wip", "no-scan"]
Org-wide default author patterns to require on PRs/MRs for scanning (null = any). Glob patterns (*, **, ?, {a,b}), case-insensitive. A repo's .hacktron/config.yaml include.authors overrides this.
["alice", "bob"]
Org-wide default author patterns to exclude PR/MR scans for (null = none). Glob patterns (*, **, ?, {a,b}), case-insensitive. Takes precedence over scan_include_authors. A repo's .hacktron/config.yaml exclude.authors overrides this.
["dependabot[bot]", "renovate[bot]", "*-bot"]
Org-wide default title keywords to require on PRs/MRs for scanning (null = any). Case-insensitive substring match. A repo's .hacktron/config.yaml include.keywords overrides this.
["release", "security"]
Org-wide default title keywords to exclude PR/MR scans for (null = none). Case-insensitive substring match. A repo's .hacktron/config.yaml exclude.keywords overrides this.
["[exclude hacktron]", "wip"]
Response
Whether Hacktron publishes comments and finding details to connected source control pull and merge requests
Whether Hacktron posts system comments such as skipped reviews, usage limits, and configuration warnings. Defaults to true. Requires scm_comments_enabled.
Org-wide default fail_on severity threshold for PR/MR checks. A repo's .hacktron/config.yaml fail_on.severity overrides this. Send null to disable.
critical, high, medium, low, info Org-wide default target branch patterns to scan PRs/MRs for (null = all branches). Glob patterns (*, **, ?, {a,b}), case-insensitive. A repo's .hacktron/config.yaml include.branches overrides this.
["main", "**/release/**"]
Org-wide default target branch patterns to exclude from PR/MR scans (null = none). Takes precedence over scan_include_branches. A repo's .hacktron/config.yaml exclude.branches overrides this.
["**/release/legacy/**"]
Org-wide default labels to require on PRs/MRs for scanning (null = any). A repo's .hacktron/config.yaml include.labels overrides this.
["feature", "bugfix"]
Org-wide default labels to exclude PR/MR scans for (null = none). Takes precedence over scan_include_labels. A repo's .hacktron/config.yaml exclude.labels overrides this.
["wip", "no-scan"]
Org-wide default author patterns to require on PRs/MRs for scanning (null = any). Glob patterns (*, **, ?, {a,b}), case-insensitive. A repo's .hacktron/config.yaml include.authors overrides this.
["alice", "bob"]
Org-wide default author patterns to exclude PR/MR scans for (null = none). Glob patterns (*, **, ?, {a,b}), case-insensitive. Takes precedence over scan_include_authors. A repo's .hacktron/config.yaml exclude.authors overrides this.
["dependabot[bot]", "renovate[bot]", "*-bot"]
Org-wide default title keywords to require on PRs/MRs for scanning (null = any). Case-insensitive substring match. A repo's .hacktron/config.yaml include.keywords overrides this.
["release", "security"]
Org-wide default title keywords to exclude PR/MR scans for (null = none). Case-insensitive substring match. A repo's .hacktron/config.yaml exclude.keywords overrides this.
["[exclude hacktron]", "wip"]
Was this page helpful?