> ## Documentation Index
> Fetch the complete documentation index at: https://docs.macroscope.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Get repository settings

> See a repository's configured settings, effective values, and editable fields

Returns the repository's configured settings, the values in effect after defaults are applied, and the fields your credential can change. Pass the returned `version` when you [update the settings](https://docs.macroscope.com/api-reference/endpoint/update-repo-settings.md).

## Authorization

Use a Read, Write, or Admin key for the workspace. **V1 read** keys cannot read repository settings. If you use the [MCP tool](https://docs.macroscope.com/api-reference/mcp.md#permissions), you need read access to the workspace and the repository.

**Authorization** `string` *required*

`Bearer <key>`. See [Authentication](https://docs.macroscope.com/api#authentication).

## Path parameters

**workspaceType** `string` *required*

`GITHUB_ORGANIZATION` or `GITHUB_USER`.

**workspaceId** `string` *required*

Numeric GitHub ID of the organization or user.

**repositoryId** `string` *required*

Repository ID, as returned in `repositoryId` by other endpoints. 1 to 128 characters.

## Response

**settings** `RepoSettings`

**properties**

**repositoryId** `string`

Repository ID.

**version** `string`

Current version, as a decimal string. It increases whenever the repository's settings are saved through the API or the app. Use the returned value when updating settings.

**configured** `RepoSettingValues`

Values stored for this repository. A setting is omitted when it is not set and its default applies.

**effective** `RepoSettingValues`

Values in force, with defaults applied. A limit is omitted when there is no limit. `releaseRefPatterns` holds the patterns Macroscope infers when none are configured.

**editableFields** `string`

Comma-separated names of the settings you can change with your current access and the features enabled for the workspace. An empty string means you cannot change any settings.

### RepoSettingValues

In `configured`, an omitted setting has no visible override. A setting returned as `false` is explicitly off. A setting that depends on a feature the workspace does not have, such as Approvability, is omitted from both `configured` and `effective` and cannot be changed.

**correctnessReview** `string`

When [Correctness](https://docs.macroscope.com/correctness.md) runs: `FEATURE_RUN_MODE_AUTOMATIC` (automatically), `FEATURE_RUN_MODE_MANUAL` (only when requested) or `FEATURE_RUN_MODE_NEVER`.

**checkRunAgents** `string`

When [Check Run Agents](https://docs.macroscope.com/check-run-agents) run, with the same values as `correctnessReview`.

**approvability** `string`

When [Approvability](https://docs.macroscope.com/approvability.md) runs, with the same values as `correctnessReview`.

**githubActionsAgentRunsEnabled** `boolean`

Whether the repository's [GitHub Actions](https://docs.macroscope.com/github-actions.md) workflows can run Macroscope agents.

**commitSummarizationEnabled** `boolean`

Whether Macroscope summarizes the repository's commits (Status).

**prSummaryEnabled** `boolean`

Whether Macroscope posts [pull request summaries](https://docs.macroscope.com/pull-request-descriptions.md) on GitHub.

**commentSeverityThreshold** `string`

[Minimum severity to comment](https://docs.macroscope.com/correctness.md#minimum-severity-to-comment): `COMMENT_SEVERITY_THRESHOLD_OFF` (every finding), `_LOW`, `_MEDIUM`, `_HIGH` or `_CRITICAL`.

**detectionMode** `string`

[Detection mode](https://docs.macroscope.com/code-review/detection-mode.md): `DETECTION_MODE_BUDGET`, `DETECTION_MODE_BALANCED`, `DETECTION_MODE_PRECISE` or `DETECTION_MODE_ULTRA`.

**correctnessMaxRunsPerPr** `integer`

Maximum number of automatic Correctness reviews per pull request. Omitted means no limit. You can still request a manual review after reaching the limit.

**correctnessMaxFileSizeBytes** `integer`

Largest file, in bytes, that Correctness reviews. Omitted means no limit.

**draftPrReviewEnabled** `boolean`

Whether Correctness reviews draft pull requests.

**autoMergeFixPrsEnabled** `boolean`

Whether pull requests Macroscope opens to fix review comments are merged automatically.

**requestReview** `boolean`

Whether Macroscope requests a reviewer on pull requests it opens.

**skipDependabot** `boolean`

Whether Dependabot pull requests are skipped.

**approvabilityMinBlockingSeverity** `string`

[Minimum blocking severity](https://docs.macroscope.com/approvability.md#minimum-blocking-severity): `APPROVABILITY_BLOCKING_SEVERITY_LOW`, `_MEDIUM`, `_HIGH`, `_CRITICAL` or `_OFF`. A repository with no value of its own uses `_MEDIUM`.

**approvabilityAutoRerunEnabled** `boolean`

Whether Approvability runs again when a pull request changes.

**approvabilityConclusion** `string`

[Check run conclusion](https://docs.macroscope.com/approvability.md#check-run-conclusion) for a hold the author can clear: `APPROVABILITY_CONCLUSION_NEUTRAL` or `APPROVABILITY_CONCLUSION_FAILURE`. A repository with no value of its own uses neutral. A conclusion in `.macroscope/approvability.md` overrides it.

**approvabilityMode** `string`

[Approvability mode](https://docs.macroscope.com/approvability.md#approvability-mode): `APPROVABILITY_MODE_PERMISSIVE` or `APPROVABILITY_MODE_STRICT`. A `mode` in `.macroscope/approvability.md` overrides it.

**approvabilityPreviewEnabled** `boolean`

Whether Approvability only reports the pull requests it would approve, without approving them ([Preview Mode](https://docs.macroscope.com/approvability.md#preview-mode)).

**policyRepoId** `string`

ID of the [Policy Repo](https://docs.macroscope.com/code-review/macroscope#policy-inheritance) whose configuration this repository inherits. Omitted if no Policy Repo is set or you cannot read it.

**releaseRefPatterns** `object`

Branch and tag patterns that identify releases.

**properties**

**patterns** `string[]`

Glob patterns such as `release/*`, `release/**` or `production`. An update accepts up to 100 patterns of 1 to 256 bytes each, with no surrounding whitespace or NUL characters. An empty list means no releases match. Clear the setting to use the inferred patterns again.

This example shows selected settings returned to a Write key.

```bash cURL theme={null}
curl https://api.macroscope.com/api/v1/workspaces/GITHUB_ORGANIZATION/12345678/repositories/987654321/settings \
  -H "Authorization: Bearer $MACROSCOPE_API_KEY"
```

```python Python theme={null}
import os, requests

r = requests.get(
    "https://api.macroscope.com/api/v1/workspaces/GITHUB_ORGANIZATION/12345678/repositories/987654321/settings",
    headers={"Authorization": f"Bearer {os.environ['MACROSCOPE_API_KEY']}"},
)
r.raise_for_status()
print(r.json())
```

```javascript JavaScript theme={null}
const res = await fetch(
  "https://api.macroscope.com/api/v1/workspaces/GITHUB_ORGANIZATION/12345678/repositories/987654321/settings",
  { headers: { Authorization: `Bearer ${process.env.MACROSCOPE_API_KEY}` } }
);
if (!res.ok) throw new Error(`GET failed (${res.status})`);
console.log(await res.json());
```

```json 200 theme={null}
{
  "settings": {
    "repositoryId": "987654321",
    "version": "42",
    "configured": {
      "correctnessReview": "FEATURE_RUN_MODE_AUTOMATIC",
      "prSummaryEnabled": false,
      "approvabilityMode": "APPROVABILITY_MODE_PERMISSIVE",
      "correctnessMaxRunsPerPr": 5
    },
    "effective": {
      "correctnessReview": "FEATURE_RUN_MODE_AUTOMATIC",
      "prSummaryEnabled": false,
      "approvabilityMode": "APPROVABILITY_MODE_PERMISSIVE",
      "correctnessMaxRunsPerPr": 5,
      "approvabilityMinBlockingSeverity": "APPROVABILITY_BLOCKING_SEVERITY_MEDIUM",
      "approvabilityConclusion": "APPROVABILITY_CONCLUSION_NEUTRAL",
      "releaseRefPatterns": { "patterns": ["release/*"] }
    },
    "editableFields": "correctnessReview,checkRunAgents,githubActionsAgentRunsEnabled,commitSummarizationEnabled,prSummaryEnabled,commentSeverityThreshold,detectionMode,draftPrReviewEnabled,autoMergeFixPrsEnabled,requestReview,skipDependabot,approvabilityAutoRerunEnabled,releaseRefPatterns"
  }
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.