GitSettings

更新合并请求设置。Update pull request settings.

更新指定仓库的合并请求配置。支持设置允许的合并方式、是否要求线性历史、是否自动删除源分支等。 Update the merge request configuration of the specified repository. Supports setting allowed merge methods, requiring linear history, auto-deleting source branches, etc. 访问令牌调用此接口需包含以下权限。Required permissions for access token. repo-manage:rw

put/{repo}/-/settings/pull-request

Request

  • Base URL: https://api.cnb.cool (the document declares no server; this is the origin it was published from)
  • URL: https://api.cnb.cool/{repo}/-/settings/pull-request
  • Auth: API key in header Authorization

Path parameters

repostring required

不带.git后缀的仓库名称。格式:组织名称/仓库名称。Repository name without .git suffix. Format: org/repo.

Request body

allow_merge_commit_mergeboolean

是否允许直接提交合并。Whether direct commit merge is allowed.

allow_rebase_mergeboolean

是否允许变基合并。 Whether rebase merge is allowed.

allow_squash_mergeboolean

是否允许压缩合并。 Whether squash merge is allowed.

master_auto_as_reviewerboolean

是否允许自动添加仓库管理员为评审者。Whether to automatically add repo admins as reviewers.

merge_commit_message_stylestring

直接提交合并操作时默认生成的提交信息内容。可选值:default,pull_request_title,pull_request_title_with_body

squash_commit_message_stylestring

压缩合并操作时默认生成的提交信息内容。可选值:default,pull_request_title,pull_request_title_with_body

Response

OK

Changes

No recorded changes to this operation across all 1 revision of this API.