GitSettings

设置推送管控。Set push control.

设置指定仓库的推送管控配置,可约束单文件大小、单次推送总大小等限制条件,控制仓库的推送行为。 Set the push control configuration of the specified repository. Configurable constraints include single file size limit, total push size limit, etc., to control repository push behavior. 访问令牌调用此接口需包含以下权限。Required permissions for access token. repo-manage:rw

put/{repo}/-/settings/push-limit

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/push-limit
  • Auth: API key in header Authorization

Path parameters

repostring required

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

Request body

allow_single_push_numberinteger

允许单次推送最多允许更新分支和标签的个数数量。Maximum number of branch and tag updates per single push.

check_single_push_numberboolean

是否开启单次更新分支和标签的个数限制。Whether to limit the number of branch and tag updates per single push.

commit_must_be_signaturedboolean

强制要求提交必须有签名。Require commits to be signed.

only_master_can_push_tagboolean

是否仅允许负责人和管理员推送或删除标签、创建或删除版本。Only owners/admins can push/delete tags or releases.

push_commit_must_bestring

推送提交到仓库,对提交作者和提交人进行检查。可选值:any,registered,pusher

Response

OK

Changes

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