REST API - Repos

Change the organization's PR/MR review settings. Only the fields sent change; null turns off the fail-on severity or clears a filter. A repository's .hacktron/config.yaml overrides these.

Changed on
patch/pr-review-settings

Request

  • Base URL
    https://api.hacktron.ai/v1
  • URL
    https://api.hacktron.ai/v1/pr-review-settings
  • Auth
    API key in header X-Api-Key

Headers

X-Organization-Idstring required

Organization ID

Request body

scm_comments_enabledboolean

Whether Hacktron publishes comments and finding details to connected source control pull and merge requests

scm_system_comments_enabledboolean

Whether Hacktron posts system comments such as skipped reviews, usage limits, and configuration warnings. Defaults to true. Requires scm_comments_enabled.

fail_on_severity'critical' | 'high' | 'medium' | 'low' | 'info' nullable

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.

scan_include_branchesstring[] nullable

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.

scan_exclude_branchesstring[] nullable

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.

scan_include_labelsstring[] nullable

Org-wide default labels to require on PRs/MRs for scanning (null = any). A repo's .hacktron/config.yaml include.labels overrides this.

scan_exclude_labelsstring[] nullable

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.

scan_include_authorsstring[] nullable

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.

scan_exclude_authorsstring[] nullable

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.

scan_include_keywordsstring[] nullable

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.

scan_exclude_keywordsstring[] nullable

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.

Example request

{
  "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"
  ]
}

Response

scm_comments_enabledboolean

Whether Hacktron publishes comments and finding details to connected source control pull and merge requests

scm_system_comments_enabledboolean

Whether Hacktron posts system comments such as skipped reviews, usage limits, and configuration warnings. Defaults to true. Requires scm_comments_enabled.

fail_on_severity'critical' | 'high' | 'medium' | 'low' | 'info' nullable

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.

scan_include_branchesstring[] nullable

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.

scan_exclude_branchesstring[] nullable

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.

scan_include_labelsstring[] nullable

Org-wide default labels to require on PRs/MRs for scanning (null = any). A repo's .hacktron/config.yaml include.labels overrides this.

scan_exclude_labelsstring[] nullable

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.

scan_include_authorsstring[] nullable

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.

scan_exclude_authorsstring[] nullable

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.

scan_include_keywordsstring[] nullable

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.

scan_exclude_keywordsstring[] nullable

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.

Example response

{
  "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"
  ]
}

Changes