Struct PullRequestReviewComment

Source
pub struct PullRequestReviewComment {
Show 27 fields pub author_association: AuthorAssociation, pub body: String, pub commit_id: String, pub created_at: DateTime<Utc>, pub diff_hunk: String, pub html_url: String, pub id: i64, pub in_reply_to_id: Option<i64>, pub line: Option<i64>, pub links: PullRequestReviewCommentLinks, pub node_id: String, pub original_commit_id: String, pub original_line: i64, pub original_position: i64, pub original_start_line: Option<i64>, pub path: String, pub position: Option<i64>, pub pull_request_review_id: i64, pub pull_request_url: String, pub reactions: Reactions, pub side: PullRequestReviewCommentSide, pub start_line: Option<i64>, pub start_side: Option<PullRequestReviewCommentStartSide>, pub subject_type: Option<PullRequestReviewCommentSubjectType>, pub updated_at: DateTime<Utc>, pub url: String, pub user: User,
}
Expand description

The comment itself.

JSON schema
{
 "title": "Pull Request Review Comment",
 "description": "The [comment](https://docs.github.com/en/rest/reference/pulls#comments) itself.",
 "type": "object",
 "required": [
   "_links",
   "author_association",
   "body",
   "commit_id",
   "created_at",
   "diff_hunk",
   "html_url",
   "id",
   "line",
   "node_id",
   "original_commit_id",
   "original_line",
   "original_position",
   "original_start_line",
   "path",
   "position",
   "pull_request_review_id",
   "pull_request_url",
   "reactions",
   "side",
   "start_line",
   "start_side",
   "updated_at",
   "url",
   "user"
 ],
 "properties": {
   "_links": {
     "type": "object",
     "required": [
       "html",
       "pull_request",
       "self"
     ],
     "properties": {
       "html": {
         "$ref": "#/definitions/link"
       },
       "pull_request": {
         "$ref": "#/definitions/link"
       },
       "self": {
         "$ref": "#/definitions/link"
       }
     },
     "additionalProperties": false
   },
   "author_association": {
     "$ref": "#/definitions/author_association"
   },
   "body": {
     "description": "The text of the comment.",
     "type": "string"
   },
   "commit_id": {
     "description": "The SHA of the commit to which the comment applies.",
     "type": "string"
   },
   "created_at": {
     "type": "string",
     "format": "date-time"
   },
   "diff_hunk": {
     "description": "The diff of the line that the comment refers to.",
     "type": "string"
   },
   "html_url": {
     "description": "HTML URL for the pull request review comment.",
     "type": "string",
     "format": "uri"
   },
   "id": {
     "description": "The ID of the pull request review comment.",
     "type": "integer"
   },
   "in_reply_to_id": {
     "description": "The comment ID to reply to.",
     "type": "integer"
   },
   "line": {
     "description": "The line of the blob to which the comment applies. The last line of the range for a multi-line comment",
     "type": [
       "integer",
       "null"
     ]
   },
   "node_id": {
     "description": "The node ID of the pull request review comment.",
     "type": "string"
   },
   "original_commit_id": {
     "description": "The SHA of the original commit to which the comment applies.",
     "type": "string"
   },
   "original_line": {
     "description": "The line of the blob to which the comment applies. The last line of the range for a multi-line comment",
     "type": "integer"
   },
   "original_position": {
     "description": "The index of the original line in the diff to which the comment applies.",
     "type": "integer"
   },
   "original_start_line": {
     "description": "The first line of the range for a multi-line comment.",
     "type": [
       "integer",
       "null"
     ]
   },
   "path": {
     "description": "The relative path of the file to which the comment applies.",
     "type": "string"
   },
   "position": {
     "description": "The line index in the diff to which the comment applies.",
     "type": [
       "integer",
       "null"
     ]
   },
   "pull_request_review_id": {
     "description": "The ID of the pull request review to which the comment belongs.",
     "type": "integer"
   },
   "pull_request_url": {
     "description": "URL for the pull request that the review comment belongs to.",
     "type": "string",
     "format": "uri"
   },
   "reactions": {
     "$ref": "#/definitions/reactions"
   },
   "side": {
     "description": "The side of the first line of the range for a multi-line comment.",
     "type": "string",
     "enum": [
       "LEFT",
       "RIGHT"
     ]
   },
   "start_line": {
     "description": "The first line of the range for a multi-line comment.",
     "type": [
       "integer",
       "null"
     ]
   },
   "start_side": {
     "description": "The side of the first line of the range for a multi-line comment.",
     "default": "RIGHT",
     "type": [
       "string",
       "null"
     ],
     "enum": [
       "LEFT",
       "RIGHT",
       null
     ]
   },
   "subject_type": {
     "description": "The level at which the comment is targeted, can be a diff line or a file.",
     "type": "string",
     "enum": [
       "line",
       "file"
     ]
   },
   "updated_at": {
     "type": "string",
     "format": "date-time"
   },
   "url": {
     "description": "URL for the pull request review comment",
     "type": "string",
     "format": "uri"
   },
   "user": {
     "$ref": "#/definitions/user"
   }
 },
 "additionalProperties": false,
 "$schema": "http://json-schema.org/draft-07/schema"
}

Fields§

§author_association: AuthorAssociation§body: String

The text of the comment.

§commit_id: String

The SHA of the commit to which the comment applies.

§created_at: DateTime<Utc>§diff_hunk: String

The diff of the line that the comment refers to.

§html_url: String

HTML URL for the pull request review comment.

§id: i64

The ID of the pull request review comment.

§in_reply_to_id: Option<i64>

The comment ID to reply to.

§line: Option<i64>

The line of the blob to which the comment applies. The last line of the range for a multi-line comment

§links: PullRequestReviewCommentLinks§node_id: String

The node ID of the pull request review comment.

§original_commit_id: String

The SHA of the original commit to which the comment applies.

§original_line: i64

The line of the blob to which the comment applies. The last line of the range for a multi-line comment

§original_position: i64

The index of the original line in the diff to which the comment applies.

§original_start_line: Option<i64>

The first line of the range for a multi-line comment.

§path: String

The relative path of the file to which the comment applies.

§position: Option<i64>

The line index in the diff to which the comment applies.

§pull_request_review_id: i64

The ID of the pull request review to which the comment belongs.

§pull_request_url: String

URL for the pull request that the review comment belongs to.

§reactions: Reactions§side: PullRequestReviewCommentSide

The side of the first line of the range for a multi-line comment.

§start_line: Option<i64>

The first line of the range for a multi-line comment.

§start_side: Option<PullRequestReviewCommentStartSide>

The side of the first line of the range for a multi-line comment.

§subject_type: Option<PullRequestReviewCommentSubjectType>

The level at which the comment is targeted, can be a diff line or a file.

§updated_at: DateTime<Utc>§url: String

URL for the pull request review comment

§user: User

Implementations§

Trait Implementations§

Source§

impl Clone for PullRequestReviewComment

Source§

fn clone(&self) -> PullRequestReviewComment

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for PullRequestReviewComment

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for PullRequestReviewComment

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl From<&PullRequestReviewComment> for PullRequestReviewComment

Source§

fn from(value: &PullRequestReviewComment) -> Self

Converts to this type from the input type.
Source§

impl From<PullRequestReviewComment> for PullRequestReviewComment

Source§

fn from(value: PullRequestReviewComment) -> Self

Converts to this type from the input type.
Source§

impl Serialize for PullRequestReviewComment

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl TryFrom<PullRequestReviewComment> for PullRequestReviewComment

Source§

type Error = String

The type returned in the event of a conversion error.
Source§

fn try_from(value: PullRequestReviewComment) -> Result<Self, String>

Performs the conversion.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,