pub enum ReviewTarget {
UncommittedChanges,
BaseBranch {
branch: String,
},
Commit {
sha: String,
title: Option<String>,
},
Custom {
instructions: String,
},
}Expand description
ReviewTarget
JSON schema
{
"oneOf": [
{
"title": "UncommittedChangesReviewTarget",
"description": "Review the working tree: staged, unstaged, and untracked files.",
"type": "object",
"required": [
"type"
],
"properties": {
"type": {
"title": "UncommittedChangesReviewTargetType",
"type": "string",
"enum": [
"uncommittedChanges"
]
}
}
},
{
"title": "BaseBranchReviewTarget",
"description": "Review changes between the current branch and the given base branch.",
"type": "object",
"required": [
"branch",
"type"
],
"properties": {
"branch": {
"type": "string"
},
"type": {
"title": "BaseBranchReviewTargetType",
"type": "string",
"enum": [
"baseBranch"
]
}
}
},
{
"title": "CommitReviewTarget",
"description": "Review the changes introduced by a specific commit.",
"type": "object",
"required": [
"sha",
"type"
],
"properties": {
"sha": {
"type": "string"
},
"title": {
"description": "Optional human-readable label (e.g., commit subject) for UIs.",
"type": [
"string",
"null"
]
},
"type": {
"title": "CommitReviewTargetType",
"type": "string",
"enum": [
"commit"
]
}
}
},
{
"title": "CustomReviewTarget",
"description": "Arbitrary instructions, equivalent to the old free-form prompt.",
"type": "object",
"required": [
"instructions",
"type"
],
"properties": {
"instructions": {
"type": "string"
},
"type": {
"title": "CustomReviewTargetType",
"type": "string",
"enum": [
"custom"
]
}
}
}
]
}Variants§
UncommittedChanges
BaseBranch
BaseBranchReviewTarget
Review changes between the current branch and the given base branch.
Commit
CommitReviewTarget
Review the changes introduced by a specific commit.
Fields
Custom
CustomReviewTarget
Arbitrary instructions, equivalent to the old free-form prompt.
Trait Implementations§
Source§impl Clone for ReviewTarget
impl Clone for ReviewTarget
Source§fn clone(&self) -> ReviewTarget
fn clone(&self) -> ReviewTarget
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ReviewTarget
impl Debug for ReviewTarget
Source§impl<'de> Deserialize<'de> for ReviewTarget
impl<'de> Deserialize<'de> for ReviewTarget
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 ReviewTarget
impl RefUnwindSafe for ReviewTarget
impl Send for ReviewTarget
impl Sync for ReviewTarget
impl Unpin for ReviewTarget
impl UnsafeUnpin for ReviewTarget
impl UnwindSafe for ReviewTarget
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