pub struct PullsCreateReviewCommentRequest {
pub body: String,
pub commit_id: String,
pub path: String,
pub position: Option<i32>,
pub side: Option<Side>,
pub line: Option<i32>,
pub start_line: Option<i32>,
pub start_side: Option<StartSide>,
pub in_reply_to: Option<i32>,
pub subject_type: Option<SubjectType>,
}
Fields§
§body: String
The text of the review comment.
commit_id: String
The SHA of the commit needing a comment. Not using the latest commit SHA may render your comment outdated if a subsequent commit modifies the line you specify as the position
.
path: String
The relative path to the file that necessitates a comment.
position: Option<i32>
This parameter is deprecated. Use line
instead. The position in the diff where you want to add a review comment. Note this value is not the same as the line number in the file. The position value equals the number of lines down from the first "@@" hunk header in the file you want to add a comment. The line just below the "@@" line is position 1, the next line is position 2, and so on. The position in the diff continues to increase through lines of whitespace and additional hunks until the beginning of a new file.
side: Option<Side>
In a split diff view, the side of the diff that the pull request’s changes appear on. Can be LEFT
or RIGHT
. Use LEFT
for deletions that appear in red. Use RIGHT
for additions that appear in green or unchanged lines that appear in white and are shown for context. For a multi-line comment, side represents whether the last line of the comment range is a deletion or addition. For more information, see "Diff view options" in the GitHub Help documentation.
line: Option<i32>
Required unless using subject_type:file
. The line of the blob in the pull request diff that the comment applies to. For a multi-line comment, the last line of the range that your comment applies to.
start_line: Option<i32>
Required when using multi-line comments unless using in_reply_to
. The start_line
is the first line in the pull request diff that your multi-line comment applies to. To learn more about multi-line comments, see "Commenting on a pull request" in the GitHub Help documentation.
start_side: Option<StartSide>
Required when using multi-line comments unless using in_reply_to
. The start_side
is the starting side of the diff that the comment applies to. Can be LEFT
or RIGHT
. To learn more about multi-line comments, see "Commenting on a pull request" in the GitHub Help documentation. See side
in this table for additional context.
in_reply_to: Option<i32>
The ID of the review comment to reply to. To find the ID of a review comment with "List review comments on a pull request". When specified, all parameters other than body
in the request body are ignored.
subject_type: Option<SubjectType>
The level at which the comment is targeted.
Implementations§
Trait Implementations§
Source§impl Clone for PullsCreateReviewCommentRequest
impl Clone for PullsCreateReviewCommentRequest
Source§fn clone(&self) -> PullsCreateReviewCommentRequest
fn clone(&self) -> PullsCreateReviewCommentRequest
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Default for PullsCreateReviewCommentRequest
impl Default for PullsCreateReviewCommentRequest
Source§fn default() -> PullsCreateReviewCommentRequest
fn default() -> PullsCreateReviewCommentRequest
Source§impl<'de> Deserialize<'de> for PullsCreateReviewCommentRequest
impl<'de> Deserialize<'de> for PullsCreateReviewCommentRequest
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl PartialEq for PullsCreateReviewCommentRequest
impl PartialEq for PullsCreateReviewCommentRequest
Source§fn eq(&self, other: &PullsCreateReviewCommentRequest) -> bool
fn eq(&self, other: &PullsCreateReviewCommentRequest) -> bool
self
and other
values to be equal, and is used by ==
.