Skip to main content

PrCommands

Enum PrCommands 

Source
pub enum PrCommands {
Show 26 variants List { repo: String, state: Vec<PrState>, query: Option<String>, sort: Option<String>, page: Option<u32>, limit: u32, }, View { repo: String, id: u64, web: bool, }, Create { repo: String, title: String, source: String, destination: Option<String>, body: Option<String>, close_source_branch: bool, reviewers: Option<String>, }, Edit { repo: String, id: u64, title: Option<String>, body: Option<String>, reviewers: Option<String>, destination: Option<String>, }, Merge { repo: String, id: u64, strategy: MergeStrategyArg, message: Option<String>, close_source_branch: bool, }, Approve { repo: String, id: u64, }, Unapprove { repo: String, id: u64, }, RequestChanges { repo: String, id: u64, }, UnrequestChanges { repo: String, id: u64, }, Decline { repo: String, id: u64, }, Checkout { repo: String, id: u64, }, Diff { repo: String, id: u64, }, Comment { repo: String, id: u64, body: String, path: Option<String>, line: Option<u32>, parent: Option<u64>, }, EditComment { repo: String, id: u64, comment_id: u64, body: String, }, DeleteComment { repo: String, id: u64, comment_id: u64, yes: bool, }, ResolveComment { repo: String, id: u64, comment_id: u64, }, UnresolveComment { repo: String, id: u64, comment_id: u64, }, ListComments { repo: String, id: u64, limit: u32, }, ViewComment { repo: String, id: u64, comment_id: u64, }, Pipelines { repo: String, id: u64, scan_limit: u32, }, Commits { repo: String, id: u64, limit: u32, }, Statuses { repo: String, id: u64, }, Diffstat { repo: String, id: u64, limit: u32, }, Task { command: TaskCommands, }, Activity { repo: String, id: u64, limit: u32, }, Patch { repo: String, id: u64, },
}

Variants§

§

List

List pull requests

Fields

§repo: String

Repository in format workspace/repo-slug

§state: Vec<PrState>

Filter by state (repeatable to match several states)

§query: Option<String>

Filter with a Bitbucket query (BBQL) expression

§sort: Option<String>

Sort field (e.g. -updated_on)

§page: Option<u32>

Page number to fetch

§limit: u32

Number of results

§

View

View pull request details

Fields

§repo: String

Repository in format workspace/repo-slug

§id: u64

Pull request ID

§web: bool

Open in browser

§

Create

Create a new pull request

Fields

§repo: String

Repository in format workspace/repo-slug

§title: String

Title of the pull request

§source: String

Source branch

§destination: Option<String>

Destination branch (defaults to main branch)

§body: Option<String>

Description of the pull request

§close_source_branch: bool

Close source branch after merge

§reviewers: Option<String>

Comma-separated reviewer account IDs, UUIDs, or usernames

§

Edit

Edit an existing pull request

Fields

§repo: String

Repository in format workspace/repo-slug

§id: u64

Pull request ID

§title: Option<String>

New title

§body: Option<String>

New description

§reviewers: Option<String>

Comma-separated reviewer account IDs, UUIDs, or usernames (replaces the reviewer list)

§destination: Option<String>

New destination branch

§

Merge

Merge a pull request

Fields

§repo: String

Repository in format workspace/repo-slug

§id: u64

Pull request ID

§strategy: MergeStrategyArg

Merge strategy

§message: Option<String>

Commit message

§close_source_branch: bool

Close source branch

§

Approve

Approve a pull request

Fields

§repo: String

Repository in format workspace/repo-slug

§id: u64

Pull request ID

§

Unapprove

Remove your approval from a pull request

Fields

§repo: String

Repository in format workspace/repo-slug

§id: u64

Pull request ID

§

RequestChanges

Request changes on a pull request

Fields

§repo: String

Repository in format workspace/repo-slug

§id: u64

Pull request ID

§

UnrequestChanges

Withdraw your request for changes on a pull request

Fields

§repo: String

Repository in format workspace/repo-slug

§id: u64

Pull request ID

§

Decline

Decline a pull request

Fields

§repo: String

Repository in format workspace/repo-slug

§id: u64

Pull request ID

§

Checkout

Checkout a pull request branch locally

Fields

§repo: String

Repository in format workspace/repo-slug

§id: u64

Pull request ID

§

Diff

View pull request diff

Fields

§repo: String

Repository in format workspace/repo-slug

§id: u64

Pull request ID

§

Comment

Add a comment to a pull request

Fields

§repo: String

Repository in format workspace/repo-slug

§id: u64

Pull request ID

§body: String

Comment text

§path: Option<String>

File path for an inline comment

§line: Option<u32>

Line number for an inline comment (requires –path)

§parent: Option<u64>

Parent comment ID to reply to

§

EditComment

Edit a comment on a pull request

Fields

§repo: String

Repository in format workspace/repo-slug

§id: u64

Pull request ID

§comment_id: u64

Comment ID

§body: String

New comment text

§

DeleteComment

Delete a comment on a pull request

Fields

§repo: String

Repository in format workspace/repo-slug

§id: u64

Pull request ID

§comment_id: u64

Comment ID

§yes: bool

Skip confirmation prompt

§

ResolveComment

Resolve a comment thread on a pull request

Fields

§repo: String

Repository in format workspace/repo-slug

§id: u64

Pull request ID

§comment_id: u64

Comment ID

§

UnresolveComment

Reopen a resolved comment thread on a pull request

Fields

§repo: String

Repository in format workspace/repo-slug

§id: u64

Pull request ID

§comment_id: u64

Comment ID

§

ListComments

List comments on a pull request

Fields

§repo: String

Repository in format workspace/repo-slug

§id: u64

Pull request ID

§limit: u32

Number of results

§

ViewComment

View a specific comment on a pull request

Fields

§repo: String

Repository in format workspace/repo-slug

§id: u64

Pull request ID

§comment_id: u64

Comment ID

§

Pipelines

List pipelines for the PR’s head commit

Fields

§repo: String

Repository in format workspace/repo-slug

§id: u64

Pull request ID

§scan_limit: u32

Maximum recent pipelines to scan for matches (capped at 100)

§

Commits

List commits on a pull request

Fields

§repo: String

Repository in format workspace/repo-slug

§id: u64

Pull request ID

§limit: u32

Number of results

§

Statuses

Show build statuses for a pull request

Fields

§repo: String

Repository in format workspace/repo-slug

§id: u64

Pull request ID

§

Diffstat

Show the per-file change summary for a pull request

Fields

§repo: String

Repository in format workspace/repo-slug

§id: u64

Pull request ID

§limit: u32

Number of results

§

Task

Manage tasks on a pull request

Fields

§

Activity

Show the activity feed for a pull request

Fields

§repo: String

Repository in format workspace/repo-slug

§id: u64

Pull request ID

§limit: u32

Number of results

§

Patch

Print the patch (mbox-style) for a pull request

Fields

§repo: String

Repository in format workspace/repo-slug

§id: u64

Pull request ID

Implementations§

Source§

impl PrCommands

Source

pub async fn run(self) -> Result<()>

Trait Implementations§

Source§

impl FromArgMatches for PrCommands

Source§

fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>

Instantiate Self from ArgMatches, parsing the arguments as needed. Read more
Source§

fn from_arg_matches_mut( __clap_arg_matches: &mut ArgMatches, ) -> Result<Self, Error>

Instantiate Self from ArgMatches, parsing the arguments as needed. Read more
Source§

fn update_from_arg_matches( &mut self, __clap_arg_matches: &ArgMatches, ) -> Result<(), Error>

Assign values from ArgMatches to self.
Source§

fn update_from_arg_matches_mut<'b>( &mut self, __clap_arg_matches: &mut ArgMatches, ) -> Result<(), Error>

Assign values from ArgMatches to self.
Source§

impl Subcommand for PrCommands

Source§

fn augment_subcommands<'b>(__clap_app: Command) -> Command

Append to Command so it can instantiate Self via FromArgMatches::from_arg_matches_mut Read more
Source§

fn augment_subcommands_for_update<'b>(__clap_app: Command) -> Command

Append to Command so it can instantiate self via FromArgMatches::update_from_arg_matches_mut Read more
Source§

fn has_subcommand(__clap_name: &str) -> bool

Test whether Self can parse a specific subcommand

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> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

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

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

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

Source§

type Error = !

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

fn try_from(value: U) -> Result<T, !>

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<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more