跳到主要内容

Update Pull Request Information

PATCH 

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

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

    titlestring

    Optional. Pull Request title

    bodystring

    Optional. Content of the Pull Request

    statestring

    Optional. Pull Request status

    milestone_numberinteger

    Optional. Milestone sequence number (id)

    labelsstring

    A comma-separated list of labels, where the name must be between 2-20 characters long and cannot contain special characters. For example: bug,performance

    draftboolean

    Whether to set as draft

    close_related_issueboolean

    Optional, whether to close associated Issues after merging, default is set according to the repository configuration

    prune_branchboolean

    Merge and delete the source branch

    squash_mergeboolean

    Squash merge

Responses​

Successful Response

Response Headers
    Schema
      titlestring
      bodystring
      statestring
      created_atstring
      updated_atstring