pub struct Review {
pub id: u64,
pub repo_key: String,
pub pr_number: u32,
pub author: String,
pub state: ReviewState,
pub body: Option<String>,
pub commit_id: String,
pub created_at: u64,
pub submitted_at: Option<u64>,
}Expand description
A code review on a pull request.
Fields§
§id: u64Unique identifier.
repo_key: StringRepository key (owner/repo).
pr_number: u32Pull request number.
Reviewer’s public key (hex encoded).
state: ReviewStateReview state.
body: Option<String>Review body/summary (optional).
commit_id: StringCommit SHA that was reviewed.
created_at: u64Unix timestamp when the review was created.
submitted_at: Option<u64>Unix timestamp when the review was submitted.
Implementations§
Source§impl Review
impl Review
Sourcepub fn new(
id: u64,
repo_key: impl Into<String>,
pr_number: u32,
author: impl Into<String>,
state: ReviewState,
commit_id: impl Into<String>,
) -> Self
pub fn new( id: u64, repo_key: impl Into<String>, pr_number: u32, author: impl Into<String>, state: ReviewState, commit_id: impl Into<String>, ) -> Self
Creates a new review.
Sourcepub fn is_approved(&self) -> bool
pub fn is_approved(&self) -> bool
Returns true if this review approves the PR.
Sourcepub fn requests_changes(&self) -> bool
pub fn requests_changes(&self) -> bool
Returns true if this review requests changes.
Sourcepub fn is_dismissed(&self) -> bool
pub fn is_dismissed(&self) -> bool
Returns true if this review was dismissed.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Review
impl<'de> Deserialize<'de> for Review
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>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for Review
impl RefUnwindSafe for Review
impl Send for Review
impl Sync for Review
impl Unpin for Review
impl UnsafeUnpin for Review
impl UnwindSafe for Review
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more