跳到主要内容

Get All Comments of a Pull Request

GET 

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

Request​

Path Parameters

    owner stringrequired

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

    Example: {{owner}}
    repo stringrequired

    Repository path (path)

    Example: {{repo}}
    number integerrequired

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

    Example: 1

Query Parameters

    access_token string

    User authorization code

    Example: {{access_token}}
    page integer

    Current page number: defaults to 1

    Example: 1
    per_page integer

    The number of items per page, with a maximum of 100. The default is 20.

    Example: 10
    direction string

    Optional. Ascending/descending (asc/desc)

    comment_type string

    Optional. Filter by comment type. Code line comment / PR ordinary comment: diff_comment / pr_comment

Responses​

Successful Response

Response Headers
    Schema
    • Array [
    • idinteger
      discussion_idstring

      Discussion ID

      bodystring
      created_atstring
      updated_atstring
      user object
      idstringrequired
      loginstringrequired
      object_idstringrequired
      namestringrequired
      avatar_urlstringrequired
      html_urlstringrequired
      comment_typestring
      resolvedboolean

      Check if the comments have been resolved

      resolved_by object

      Inspector's opinion, resolved by the person in charge, only returned when the inspector's opinion has been resolved

      idstringrequired
      loginstringrequired
      object_idstringrequired
      namestringrequired
      avatar_urlstringrequired
      html_urlstringrequired
      diff_position object
      start_new_lineintegerrequired
      end_new_lineintegerrequired
      position_typestringrequired

      "binary": "File-level comments", "text": "Code line comments".

    • ]