Pulls

合并拉取请求。Merge pull request.

将指定的合并请求合并到目标分支。通过请求体指定合并方式(如合并提交、压缩合并、变基合并)、合并提交信息以及是否强制合并。合并前会检查是否满足合并条件(如无冲突、评审通过等)。强制合并仅允许仓库负责人或管理员操作。合并成功后返回合并结果信息。 Merge the specified merge request into the target branch. The request body can specify the merge method (merge commit, squash, rebase), merge commit message, and whether to force merge. Pre-merge checks are performed (e.g., no conflicts, reviews passed). Force merge is only allowed for repository owners or admins. Returns merge result information on success. 访问令牌调用此接口需包含以下权限。Required permissions for access token. repo-pr:rw

put/{repo}/-/pulls/{number}/merge

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}/-/pulls/{number}/merge
  • Auth: API key in header Authorization

Path parameters

repostring required

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

numberstring required

Pull唯一标识编号。

Request body

commit_messagestring

合并提交的详细描述信息。Merge commit detailed description.

commit_titlestring

合并提交的标题。Merge commit title.

forceboolean

是否强制合并。Whether to force merge, only allowed for repository owner or admin.

merge_stylestring

合并提交方式。可选值:merge,squash,rebase

Response

OK

Changes

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