PullRequestManager

Struct PullRequestManager 

Source
pub struct PullRequestManager { /* private fields */ }
Expand description

Pull request manager for Bitbucket operations

Implementations§

Source§

impl PullRequestManager

Source

pub fn new(client: BitbucketClient) -> Self

Create a new pull request manager

Source

pub async fn create_pull_request( &self, request: CreatePullRequestRequest, ) -> Result<PullRequest>

Create a new pull request

Source

pub async fn get_pull_request(&self, pr_id: u64) -> Result<PullRequest>

Get a pull request by ID

Source

pub async fn update_pull_request( &self, pr_id: u64, title: Option<String>, description: Option<String>, version: u64, ) -> Result<PullRequest>

Update a pull request (title, description, etc)

Source

pub async fn list_pull_requests( &self, state: Option<PullRequestState>, ) -> Result<PullRequestPage>

List pull requests with optional filters

Source

pub async fn update_source_branch( &self, old_pr_id: u64, new_request: CreatePullRequestRequest, close_reason: Option<String>, ) -> Result<PullRequest>

Update a pull request’s source branch by closing the old PR and creating a new one This is needed because Bitbucket doesn’t allow changing PR source branches

Source

pub async fn decline_pull_request(&self, pr_id: u64, reason: &str) -> Result<()>

Decline a pull request with a reason

Source

pub async fn add_comment(&self, pr_id: u64, comment: &str) -> Result<()>

Add a comment to a pull request explaining the branch update

Source

pub async fn get_pull_request_status( &self, pr_id: u64, ) -> Result<PullRequestStatus>

Get comprehensive status information for a pull request

Source

pub async fn get_pull_request_participants( &self, pr_id: u64, ) -> Result<Vec<Participant>>

Get all participants (including reviewers) for a PR

Source

pub async fn check_mergeable_detailed( &self, pr_id: u64, ) -> Result<MergeabilityDetails>

Check if PR is mergeable and get detailed blocking reasons

Source

pub async fn check_mergeable(&self, pr_id: u64) -> Result<bool>

Check if PR is mergeable (legacy method - kept for backward compatibility)

Source

pub async fn get_build_status(&self, pr_id: u64) -> Result<BuildStatus>

Get build status for a PR

Source

pub async fn get_conflicts(&self, pr_id: u64) -> Result<Vec<String>>

Get conflict information for a PR

NOTE: Currently unimplemented - always returns empty list. Proper implementation would parse diff for conflict markers or use Bitbucket’s merge API to detect conflicts. In practice, the mergeable field from check_mergeable_detailed() is more reliable for detecting conflicts.

Source

pub async fn merge_pull_request( &self, pr_id: u64, merge_strategy: MergeStrategy, ) -> Result<PullRequest>

Merge a pull request using Bitbucket Server API

Source

pub async fn auto_merge_if_ready( &self, pr_id: u64, conditions: &AutoMergeConditions, ) -> Result<AutoMergeResult>

Auto-merge a pull request if conditions are met

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> 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 = 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> 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
Source§

impl<T> ErasedDestructor for T
where T: 'static,