API

RepoSetting

Operations

Every route this entity exposes. Each route links to its own reference on this page.

Method Route SDK operation Returns
GET /api/v1/organizations/{org_slug}/repos/{repo_slug}/settings list Physical Git repository settings snapshot
PATCH /api/v1/organizations/{org_slug}/repos/{repo_slug}/settings update Repository metadata updated
PATCH /api/v1/organizations/{org_slug}/repos/{repo_slug}/settings/land_method update Default Change land method updated
PATCH /api/v1/organizations/{org_slug}/repos/{repo_slug}/settings/magic_merge update Repository MagicMerge mode updated
PATCH /api/v1/organizations/{org_slug}/repos/{repo_slug}/settings/trunk update Repository trunk updated

Examples

One example per SDK, generated from the API model. The argument names are the parameters and fields of this entity, and the values are placeholders. The examples are not compiled or executed.

Golang

Construct client as shown in the Golang setup, then call the operations:

repo_settings, err := client.RepoSetting(nil).List(map[string]any{"organization_id": "example", "repo_id": "example"}, nil)
if err != nil {
    panic(err)
}
fmt.Println(repo_settings)
updated, err := client.RepoSetting(nil).Update(map[string]any{"organization_id": "example", "repo_id": "example"}, nil)
if err != nil {
    panic(err)
}
fmt.Println(updated)

Lua

Construct client as shown in the Lua setup, then call the operations:

local repo_settings, err = client:RepoSetting():list({ organization_id = "example", repo_id = "example" })
local updated, err = client:RepoSetting():update({ organization_id = "example", repo_id = "example" })

PHP

Construct client as shown in the PHP setup, then call the operations:

$repo_settings = $client->RepoSetting()->list(["organization_id" => "example", "repo_id" => "example"]);
$updated = $client->RepoSetting()->update(["organization_id" => "example", "repo_id" => "example"]);

Python

Construct client as shown in the Python setup, then call the operations:

repo_settings = client.RepoSetting().list({"organization_id": "example", "repo_id": "example"})
updated = client.RepoSetting().update({"organization_id": "example", "repo_id": "example"})

Ruby

Construct client as shown in the Ruby setup, then call the operations:

repo_settings = client.RepoSetting.list({ "organization_id" => "example", "repo_id" => "example" })
updated = client.RepoSetting.update({ "organization_id" => "example", "repo_id" => "example" })

TypeScript

Construct client as shown in the TypeScript setup, then call the operations:

const repo_settings = await client.RepoSetting().list({ organization_id: "example", repo_id: "example" })
const updated = await client.RepoSetting().update({ organization_id: "example", repo_id: "example" })

Fields

Field Type Required Description
active boolean Yes Active
created_at string Yes Created At
created_at_label one,string,null Yes Created At Label
description one,string,null Yes Description
expires_at one,string,null Yes Expires At
expires_at_label one,string,null Yes Expires At Label
icon_name string Yes Icon Name
id string Yes Id
last_used_at one,string,null Yes Last Used At
last_used_at_label one,string,null Yes Last Used At Label
merge_authority string Yes Merge Authority
name string Yes Name
organization_id string Yes Organization Id
permission_level string Yes Permission Level
revoked_at one,string,null Yes Revoked At
revoked_at_label one,string,null Yes Revoked At Label
slug string Yes Slug
status string Yes Status
token_preview string Yes Token Preview
updated_at string Yes Updated At
updated_at_label one,string,null Yes Updated At Label

list

GET /api/v1/organizations/{org_slug}/repos/{repo_slug}/settings

Operation ID: api_v1_settings.

Authentication: bearer token (bearerAuth).

Parameters

Parameter In Type Required Description
org_slug path string Yes
repo_slug path string Yes

Responses

200: Physical Git repository settings snapshot

application/json

Property Type Required Description
access_catalog_error string Yes
access_entry object or null Yes
access_tokens array of object Yes
access_tokens[].active boolean Yes
access_tokens[].created_at string (date-time) Yes
access_tokens[].created_at_label string Yes
access_tokens[].expires_at string (date-time) Yes
access_tokens[].expires_at_label string Yes
access_tokens[].id string Yes
access_tokens[].last_used_at string (date-time) Yes
access_tokens[].last_used_at_label string Yes
access_tokens[].name string Yes
access_tokens[].permission_level enum: read_only, read_write Yes
access_tokens[].revoked_at string (date-time) Yes
access_tokens[].revoked_at_label string Yes
access_tokens[].token_preview string Yes
access_tokens[].updated_at string (date-time) Yes
access_tokens[].updated_at_label string Yes
access_tokens_error string Yes
bookmark_protection_events array of object Yes
bookmark_protection_events[].action string Yes
bookmark_protection_events[].actor_kind enum: user, vex_automation, system, github_app, service Yes
bookmark_protection_events[].actor_label string Yes
bookmark_protection_events[].actor_user_id string Yes
bookmark_protection_events[].bookmark_name string Yes
bookmark_protection_events[].bookmark_protection_rule_id string Yes
bookmark_protection_events[].created_at string (date-time) Yes
bookmark_protection_events[].created_at_label string Yes
bookmark_protection_events[].decision enum: allowed, denied, bypassed, simulated Yes
bookmark_protection_events[].id string Yes
bookmark_protection_events[].intent string Yes
bookmark_protection_events[].metadata object Yes
bookmark_protection_events[].new_target string Yes
bookmark_protection_events[].old_target string Yes
bookmark_protection_events[].organization_id string Yes
bookmark_protection_events[].reason_codes array of string Yes
bookmark_protection_events[].repository_id string Yes
bookmark_protection_events[].source_request_id string Yes
bookmark_protection_events[].updated_at string (date-time) Yes
bookmark_protection_events[].updated_at_label string Yes
bookmark_protection_rules array of object Yes
bookmark_protection_rules[].actor_policy object Yes
bookmark_protection_rules[].bypass_mode enum: admins, none Yes
bookmark_protection_rules[].created_at string (date-time) Yes
bookmark_protection_rules[].created_by_user_id string Yes
bookmark_protection_rules[].enabled boolean Yes
bookmark_protection_rules[].id string Yes
bookmark_protection_rules[].name string Yes
bookmark_protection_rules[].organization_id string Yes
bookmark_protection_rules[].priority integer Yes
bookmark_protection_rules[].repository_id string Yes
bookmark_protection_rules[].requirements object Yes
bookmark_protection_rules[].requirements.ci object No
bookmark_protection_rules[].requirements.ci.mode enum: none, explicit, follow_github Yes
bookmark_protection_rules[].requirements.ci.require_all boolean Yes
bookmark_protection_rules[].requirements.ci.required_checks array of string or object Yes
bookmark_protection_rules[].target_kind enum: exact, pattern, default_branch Yes
bookmark_protection_rules[].target_pattern string Yes
bookmark_protection_rules[].updated_at string (date-time) Yes
bookmark_protection_rules[].updated_by_user_id string Yes
can_manage_settings boolean Yes
default_branch string Yes
default_change_land_method enum: squash, rebase Yes
github_installations array of object Yes
github_installations[].account_avatar_url string (uri) Yes
github_installations[].account_id string Yes
github_installations[].account_login string Yes
github_installations[].created_at string (date-time) Yes
github_installations[].created_at_label string Yes
github_installations[].id string Yes
github_installations[].installation_id string Yes
github_installations[].installed_at string (date-time) Yes
github_installations[].installed_at_label string Yes
github_installations[].manage_access_url string (uri) Yes
github_installations[].organization_id string Yes
github_installations[].permission_entries array of object Yes GitHub's permission hash as a display-ready list, sorted by name.
github_installations[].permission_entries[].access string Yes
github_installations[].permission_entries[].key string Yes
github_installations[].permission_entries[].name string Yes
github_installations[].permissions object Yes
github_installations[].status enum: active, suspended Yes
github_installations[].suspended_at string (date-time) Yes
github_installations[].suspended_at_label string Yes
github_installations[].updated_at string (date-time) Yes
github_installations[].updated_at_label string Yes
github_installations_error string Yes
github_required_check_snapshot object or null Yes
magic_merge_settings object or null Yes
mutation_lease object or null Yes
org string Yes
organization_id string Yes
repo string Yes
repository object Yes
repository.created_at string (date-time) Yes
repository.description string Yes
repository.icon_name string Yes
repository.id string Yes
repository.merge_authority string Yes
repository.name string Yes
repository.organization_id string Yes
repository.slug string Yes
repository.status enum: active, archived Yes
repository.updated_at string (date-time) Yes
required_check_candidates array of object Yes
required_check_candidates[].app_id integer No
required_check_candidates[].last_observed_at string (date-time) No
required_check_candidates[].name string Yes
required_check_candidates[].source enum: vex, github, any Yes
supports_manual_access_tokens boolean Yes
401: Unauthorized
403: Forbidden
404: Not found
422: Unprocessable entity
502: Bad gateway

update

PATCH /api/v1/organizations/{org_slug}/repos/{repo_slug}/settings

Operation ID: patch_api_v1_organizations_org_slug_repos_repo_slug_settings.

Authentication: bearer token (bearerAuth).

Parameters

Parameter In Type Required Description
org_slug path string Yes
repo_slug path string Yes

Request body

application/json

Property Type Required Description
description string No
icon_name string No
name string No
status enum: active, archived No

Responses

200: Repository metadata updated

application/json

Property Type Required Description
repository object Yes
repository.created_at string (date-time) Yes
repository.description string Yes
repository.icon_name string Yes
repository.id string Yes
repository.merge_authority string Yes
repository.name string Yes
repository.organization_id string Yes
repository.slug string Yes
repository.status enum: active, archived Yes
repository.updated_at string (date-time) Yes
401: Unauthorized
403: Forbidden
404: Not found
422: Unprocessable entity
502: Bad gateway

PATCH /api/v1/organizations/{org_slug}/repos/{repo_slug}/settings/land_method

Operation ID: api_v1_settings_land_method.

Authentication: bearer token (bearerAuth).

Parameters

Parameter In Type Required Description
org_slug path string Yes
repo_slug path string Yes

Request body

application/json

Property Type Required Description
default_change_land_method enum: squash, rebase Yes

Responses

200: Default Change land method updated

application/json

Property Type Required Description
default_change_land_method enum: squash, rebase Yes
401: Unauthorized
403: Forbidden
404: Not found
422: Unprocessable entity
502: Bad gateway

PATCH /api/v1/organizations/{org_slug}/repos/{repo_slug}/settings/magic_merge

Operation ID: api_v1_settings_magic_merge.

Authentication: bearer token (bearerAuth).

Parameters

Parameter In Type Required Description
org_slug path string Yes
repo_slug path string Yes

Request body

application/json

Property Type Required Description
application_mode enum: off, automatic, review, command Yes

Responses

200: Repository MagicMerge mode updated

application/json

Property Type Required Description
application_mode enum: off, automatic, review, command Yes
401: Unauthorized
403: Forbidden
404: Not found
422: Unprocessable entity
502: Bad gateway

PATCH /api/v1/organizations/{org_slug}/repos/{repo_slug}/settings/trunk

Operation ID: api_v1_settings_trunk.

Authentication: bearer token (bearerAuth).

Parameters

Parameter In Type Required Description
org_slug path string Yes
repo_slug path string Yes

Request body

application/json

Property Type Required Description
default_branch string Yes

Responses

200: Repository trunk updated

application/json

Property Type Required Description
default_branch string Yes
401: Unauthorized
403: Forbidden
404: Not found
422: Unprocessable entity
502: Bad gateway