Resource: PullRequestComment
PullRequestComment represents a comment on a pull request.
JSON representation |
---|
{ "name": string, "createTime": string, "updateTime": string, // Union field |
Fields | |
---|---|
name |
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 |
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: |
updateTime |
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: |
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 |
Optional. The review summary comment. |
comment |
Optional. The general pull request comment. |
code |
Optional. The comment on a code line. |
Review
The review summary comment.
JSON representation |
---|
{
"actionType": enum ( |
Fields | |
---|---|
actionType |
Required. The review action type. |
body |
Optional. The comment body. |
effectiveCommitSha |
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 |
Required. The comment body. |
Code
The comment on a code line.
JSON representation |
---|
{
"body": string,
"reply": string,
"position": {
object ( |
Fields | |
---|---|
body |
Required. The comment body. |
reply |
Optional. Input only. The PullRequestComment resource name that this comment is replying to. |
position |
Optional. The position of the comment. |
effectiveRootComment |
Output only. The root comment of the conversation, derived from the reply field. |
resolved |
Output only. Boolean indicator if the comment is resolved. |
effectiveCommitSha |
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 |
Required. The path of the file. |
line |
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 |
|
---|---|
|
Batch creates pull request comments. |
|
Creates a pull request comment. |
|
Deletes a pull request comment. |
|
Gets a pull request comment. |
|
Lists pull request comments. |
|
Updates a pull request comment. |
|
Resolves pull request comments. |
|
Unresolves pull request comment. |