REST Resource: projects.locations.repositories.pullRequests.pullRequestComments

Resource: PullRequestComment

PullRequestComment represents a comment on a pull request.

JSON representation
{
  "name": string,
  "createTime": string,
  "updateTime": string,

  // Union field comment_detail can be only one of the following:
  "review": {
    object (Review)
  },
  "comment": {
    object (Comment)
  },
  "code": {
    object (Code)
  }
  // End of list of possible types for union field comment_detail.
}
Fields
name

string

Identifier. Unique identifier for the pull request comment. The comment id is generated by the server. Format: projects/{project}/locations/{location}/repositories/{repository}/pullRequests/{pullRequest}/pullRequestComments/{comment_id}

createTime

string (Timestamp format)

Output only. Creation timestamp.

Uses RFC 3339, where generated output will always be Z-normalized and uses 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: "2014-10-02T15:01:23Z", "2014-10-02T15:01:23.045123456Z" or "2014-10-02T15:01:23+05:30".

updateTime

string (Timestamp format)

Output only. Last updated timestamp.

Uses RFC 3339, where generated output will always be Z-normalized and uses 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: "2014-10-02T15:01:23Z", "2014-10-02T15:01:23.045123456Z" or "2014-10-02T15:01:23+05:30".

Union field comment_detail. The comment detail. A comment can be a review, a general comment, or a code comment. comment_detail can be only one of the following:
review

object (Review)

Optional. The review summary comment.

comment

object (Comment)

Optional. The general pull request comment.

code

object (Code)

Optional. The comment on a code line.

Review

The review summary comment.

JSON representation
{
  "actionType": enum (ActionType),
  "body": string,
  "effectiveCommitSha": string
}
Fields
actionType

enum (ActionType)

Required. The review action type.

body

string

Optional. The comment body.

effectiveCommitSha

string

Output only. The effective commit sha this review is pointing to.

ActionType

The review action type.

Enums
ACTION_TYPE_UNSPECIFIED Unspecified.
COMMENT A general review comment.
CHANGE_REQUESTED Change required from this review.
APPROVED Change approved from this review.

Comment

The general pull request comment.

JSON representation
{
  "body": string
}
Fields
body

string

Required. The comment body.

Code

The comment on a code line.

JSON representation
{
  "body": string,
  "reply": string,
  "position": {
    object (Position)
  },
  "effectiveRootComment": string,
  "resolved": boolean,
  "effectiveCommitSha": string
}
Fields
body

string

Required. The comment body.

reply

string

Optional. Input only. The PullRequestComment resource name that this comment is replying to.

position

object (Position)

Optional. The position of the comment.

effectiveRootComment

string

Output only. The root comment of the conversation, derived from the reply field.

resolved

boolean

Output only. Boolean indicator if the comment is resolved.

effectiveCommitSha

string

Output only. The effective commit sha this code comment is pointing to.

Position

The position of the code comment.

JSON representation
{
  "path": string,
  "line": string
}
Fields
path

string

Required. The path of the file.

line

string (int64 format)

Required. The line number of the comment. Positive value means it's on the new side of the diff, negative value means it's on the old side.

Methods

batchCreate

Batch creates pull request comments.

create

Creates a pull request comment.

delete

Deletes a pull request comment.

get

Gets a pull request comment.

list

Lists pull request comments.

patch

Updates a pull request comment.

resolve

Resolves pull request comments.

unresolve

Unresolves pull request comment.