Skip to content
GitmoapAPIBeta
Reviewmr-settings
PATCH/groups/{group_id}/mr-settings

Update MR settings for a group (upsert, partial update)

update_group_mr_settings
  • mr_settings:manage
    A token needs the mr_settings:manage scope: Manage merge-request settingsGranted by write_api, write_repository.Every operation this scope unlocks
  • Audited · mutation

    x-gitmoap-audit: {"kind":"audited","arg":"mutation"}

Saves the group's own values for the fields you send, creating its settings if it has none; null clears a field. Repositories and groups beneath inherit them unless they override. Maintainers and above may change them.

Parameters

Path
  • group_idGroupId (string · uuid)Group ID

Request body

application/json
  • allow_merge_without_pipelineboolean or nulloptionalWhile require_pipeline_success is on: whether a merge request that no pipeline applies to may merge. Off — the default — blocks it. null inherits.
  • block_on_rejectionboolean or nulloptional
  • delete_source_branch_defaultboolean or nulloptional
  • merge_methodMergeMethodmerge_commitrebase_mergefast_forwardor nulloptional
  • override_group_settingsboolean or nulloptional
  • require_issue_criteria_greenboolean or nulloptional
  • require_linked_issueboolean or nulloptional
  • require_pipeline_successboolean or nulloptionalBlock the merge until every pipeline that applies to the merge request's head has succeeded. null inherits.
  • squash_optionSquashOptionneverallowencouragerequireor nulloptional
  • stack_auto_retargetboolean or nulloptional
  • stack_enforce_merge_orderboolean or nulloptional
  • stack_restack_strategyStackRestackStrategysignalserver_sideor nulloptional
  • unresolved_threadsboolean or nulloptional
Request body exampleSynthesized example
{}

Responses

200MR settings updatedapplication/json
  • allow_merge_without_pipelineboolean or nulloptionalWhile require_pipeline_success is on: whether a merge request that no pipeline applies to may merge. Absent inherits.
  • block_on_rejectionboolean or nulloptional
  • delete_source_branch_defaultboolean or nulloptional
  • merge_methodMergeMethodmerge_commitrebase_mergefast_forwardor nulloptional
  • override_group_settingsboolean or nulloptional
  • require_issue_criteria_greenboolean or nulloptional
  • require_linked_issueboolean or nulloptional
  • require_pipeline_successboolean or nulloptionalBlock the merge until every pipeline that applies to the merge request's head has succeeded. Absent inherits.
  • squash_optionSquashOptionneverallowencouragerequireor nulloptional
  • stack_auto_retargetboolean or nulloptional
  • stack_enforce_merge_orderboolean or nulloptional
  • stack_restack_strategyStackRestackStrategysignalserver_sideor nulloptional
  • unresolved_threadsboolean or nulloptional
200 exampleSynthesized example
{
"allow_merge_without_pipeline": false,
"block_on_rejection": false,
"delete_source_branch_default": false,
"merge_method": "merge_commit",
"override_group_settings": false,
"require_issue_criteria_green": false,
"require_linked_issue": false,
"require_pipeline_success": false,
"squash_option": "never",
"stack_auto_retarget": false,
"stack_enforce_merge_order": false,
"stack_restack_strategy": "signal",
"unresolved_threads": false
}
400Invalid requestapplication/json
Error codes
  • BAD_REQUESTThe request is malformed: a parameter or a body field is not a well-formed value of its type
  • errorErrorBody
    • The ErrorBody schema
    • codestringThe coarse category, tied to the status: NOT_FOUND, CONFLICT, INSUFFICIENT_SCOPE. Every error has one; the API reference's error catalogue lists them all.
    • messagestringWhat went wrong, for a person. Written to be read, not parsed: match on reason or code.
    • fieldstring or nulloptionalOn a 400 that refused one field's value, the field, as its JSON path: email, items[0].name. Put the message under that input. Absent on every other error.
    • reasonstring or nulloptionalThe specific code, when the error has one: LAST_ORGANIZATION_OWNER, BRANCH_PROTECTED. The message starts with it too. Match on this when it is present, and on code otherwise.
    • required_scopestring or nulloptionalThe scope the access token was missing, on INSUFFICIENT_SCOPE.
    • violationsanyoptionalPresent on the structured-validation errors (PROVIDER_VALIDATION_FAILED per-node, PIPELINE_VALIDATION_FAILED DAG): a JSON array of the offending elements, so a caller can fix every one in a single round-trip. Absent (omitted) on every other error.
400 exampleSynthesized example
{
"error": {
"code": "code-f824",
"message": "Draw the region map from operation density"
}
}
401Unauthenticated — no credential, or an invalid oneapplication/json
Error codes
  • UNAUTHORIZEDNo credential was sent, or the one sent is invalid, expired or revoked
  • errorErrorBody
    • The ErrorBody schema
    • codestringThe coarse category, tied to the status: NOT_FOUND, CONFLICT, INSUFFICIENT_SCOPE. Every error has one; the API reference's error catalogue lists them all.
    • messagestringWhat went wrong, for a person. Written to be read, not parsed: match on reason or code.
    • fieldstring or nulloptionalOn a 400 that refused one field's value, the field, as its JSON path: email, items[0].name. Put the message under that input. Absent on every other error.
    • reasonstring or nulloptionalThe specific code, when the error has one: LAST_ORGANIZATION_OWNER, BRANCH_PROTECTED. The message starts with it too. Match on this when it is present, and on code otherwise.
    • required_scopestring or nulloptionalThe scope the access token was missing, on INSUFFICIENT_SCOPE.
    • violationsanyoptionalPresent on the structured-validation errors (PROVIDER_VALIDATION_FAILED per-node, PIPELINE_VALIDATION_FAILED DAG): a JSON array of the offending elements, so a caller can fix every one in a single round-trip. Absent (omitted) on every other error.
401 exampleSynthesized example
{
"error": {
"code": "code-03b3",
"message": "Label every synthesized example"
}
}
403Forbidden — the caller's access level or token scope is insufficientapplication/json
Error codes
  • FORBIDDENYou are signed in but may not do this here; reason names the permission or the rule that refused it
  • INSUFFICIENT_SCOPEThe access token lacks the scope this operation needs; required_scope names it
  • PERMISSION_REQUIREDYou need a permission you do not hold here; the message names it
  • errorErrorBody
    • The ErrorBody schema
    • codestringThe coarse category, tied to the status: NOT_FOUND, CONFLICT, INSUFFICIENT_SCOPE. Every error has one; the API reference's error catalogue lists them all.
    • messagestringWhat went wrong, for a person. Written to be read, not parsed: match on reason or code.
    • fieldstring or nulloptionalOn a 400 that refused one field's value, the field, as its JSON path: email, items[0].name. Put the message under that input. Absent on every other error.
    • reasonstring or nulloptionalThe specific code, when the error has one: LAST_ORGANIZATION_OWNER, BRANCH_PROTECTED. The message starts with it too. Match on this when it is present, and on code otherwise.
    • required_scopestring or nulloptionalThe scope the access token was missing, on INSUFFICIENT_SCOPE.
    • violationsanyoptionalPresent on the structured-validation errors (PROVIDER_VALIDATION_FAILED per-node, PIPELINE_VALIDATION_FAILED DAG): a JSON array of the offending elements, so a caller can fix every one in a single round-trip. Absent (omitted) on every other error.
403 exampleSynthesized example
{
"error": {
"code": "code-ed9b",
"message": "Inline scalar newtypes but keep their brand"
}
}
404Group not foundapplication/json
Error codes
  • NOT_FOUNDThe resource does not exist — or exists and you cannot see it: a private resource you have no access to answers exactly as an absent one does
  • errorErrorBody
    • The ErrorBody schema
    • codestringThe coarse category, tied to the status: NOT_FOUND, CONFLICT, INSUFFICIENT_SCOPE. Every error has one; the API reference's error catalogue lists them all.
    • messagestringWhat went wrong, for a person. Written to be read, not parsed: match on reason or code.
    • fieldstring or nulloptionalOn a 400 that refused one field's value, the field, as its JSON path: email, items[0].name. Put the message under that input. Absent on every other error.
    • reasonstring or nulloptionalThe specific code, when the error has one: LAST_ORGANIZATION_OWNER, BRANCH_PROTECTED. The message starts with it too. Match on this when it is present, and on code otherwise.
    • required_scopestring or nulloptionalThe scope the access token was missing, on INSUFFICIENT_SCOPE.
    • violationsanyoptionalPresent on the structured-validation errors (PROVIDER_VALIDATION_FAILED per-node, PIPELINE_VALIDATION_FAILED DAG): a JSON array of the offending elements, so a caller can fix every one in a single round-trip. Absent (omitted) on every other error.
404 exampleSynthesized example
{
"error": {
"code": "code-b63a",
"message": "Label every synthesized example"
}
}
409The request conflicts with the resource's current state; `reason` says howapplication/json
Error codes
  • CONFLICTThe request conflicts with the resource's current state; reason says how
  • LEGAL_ACCEPTANCE_REQUIREDAccept the current Terms of Service before changing anything; reading stays open
  • errorErrorBody
    • The ErrorBody schema
    • codestringThe coarse category, tied to the status: NOT_FOUND, CONFLICT, INSUFFICIENT_SCOPE. Every error has one; the API reference's error catalogue lists them all.
    • messagestringWhat went wrong, for a person. Written to be read, not parsed: match on reason or code.
    • fieldstring or nulloptionalOn a 400 that refused one field's value, the field, as its JSON path: email, items[0].name. Put the message under that input. Absent on every other error.
    • reasonstring or nulloptionalThe specific code, when the error has one: LAST_ORGANIZATION_OWNER, BRANCH_PROTECTED. The message starts with it too. Match on this when it is present, and on code otherwise.
    • required_scopestring or nulloptionalThe scope the access token was missing, on INSUFFICIENT_SCOPE.
    • violationsanyoptionalPresent on the structured-validation errors (PROVIDER_VALIDATION_FAILED per-node, PIPELINE_VALIDATION_FAILED DAG): a JSON array of the offending elements, so a caller can fix every one in a single round-trip. Absent (omitted) on every other error.
409 exampleSynthesized example
{
"error": {
"code": "code-980f",
"message": "Inline scalar newtypes but keep their brand"
}
}

CLI

gitmoap mr-settings update-group

  • --group-ididGroup ID (id or group path)
  • --allow-merge-without-pipelineflagoptionalWhile `require_pipeline_success` is on: whether a merge request that no pipeline applies to may merge. Off — the default — blocks it. `null` inherits.
  • --block-on-rejectionflagoptional
  • --delete-source-branch-defaultflagoptional
  • --merge-methodmerge_commit | rebase_merge | fast_forwardoptional
  • --override-group-settingsflagoptional
  • --require-issue-criteria-greenflagoptional
  • --require-linked-issueflagoptional
  • --require-pipeline-successflagoptionalBlock the merge until every pipeline that applies to the merge request's head has succeeded. `null` inherits.
  • --squash-optionnever | allow | encourage | requireoptional
  • --stack-auto-retargetflagoptional
  • --stack-enforce-merge-orderflagoptional
  • --stack-restack-strategysignal | server_sideoptional
  • --unresolved-threadsflagoptional

Used in these guides