跳到主要内容

Merge Pull Request

PUT 

/api/v5/repos/:owner/:repo/pulls/:number/merge

Request​

Path Parameters

    owner stringrequired

    Repository space address (organization or individual's address path)

    repo stringrequired

    Repository path (path)

    number integerrequired

    The ordinal number of the PR in this repository, i.e., which PR it is.

    Example: 0

Query Parameters

    access_token stringrequired

    User authorization code

Body

    merge_methodstring

    The optional methods to merge PRs, merge (merge all commits), rebase (rebase and merge). Default is merge.

    titlestring

    Optional. Merge title.

    descriptionstring

    Optional. Merge description.

    force_mergeboolean

    Is it mandatory to merge (requires enabling the "Allow Admins to Force Merge" setting, and requires admin permissions)

    squashboolean

    Is squash merge, default false

    squash_commit_messagestring

    Notes related to squash merge

Responses​

Successful Response

Response Headers
    Schema
      shastring
      mergedinteger
      messagestring