Skip to main content

MergeRequestProvider

Trait MergeRequestProvider 

Source
pub trait MergeRequestProvider: Send + Sync {
    // Required method
    fn provider_name(&self) -> &'static str;

    // Provided methods
    fn get_merge_requests<'life0, 'async_trait>(
        &'life0 self,
        _filter: MrFilter,
    ) -> Pin<Box<dyn Future<Output = Result<ProviderResult<MergeRequest>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait { ... }
    fn get_merge_request<'life0, 'life1, 'async_trait>(
        &'life0 self,
        _key: &'life1 str,
    ) -> Pin<Box<dyn Future<Output = Result<MergeRequest>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait { ... }
    fn get_discussions<'life0, 'life1, 'async_trait>(
        &'life0 self,
        _mr_key: &'life1 str,
    ) -> Pin<Box<dyn Future<Output = Result<ProviderResult<Discussion>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait { ... }
    fn get_diffs<'life0, 'life1, 'async_trait>(
        &'life0 self,
        _mr_key: &'life1 str,
    ) -> Pin<Box<dyn Future<Output = Result<ProviderResult<FileDiff>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait { ... }
    fn add_comment<'life0, 'life1, 'async_trait>(
        &'life0 self,
        _mr_key: &'life1 str,
        _input: CreateCommentInput,
    ) -> Pin<Box<dyn Future<Output = Result<Comment>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait { ... }
    fn create_merge_request<'life0, 'async_trait>(
        &'life0 self,
        _input: CreateMergeRequestInput,
    ) -> Pin<Box<dyn Future<Output = Result<MergeRequest>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait { ... }
    fn update_merge_request<'life0, 'life1, 'async_trait>(
        &'life0 self,
        _key: &'life1 str,
        _input: UpdateMergeRequestInput,
    ) -> Pin<Box<dyn Future<Output = Result<MergeRequest>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait { ... }
    fn get_releases<'life0, 'async_trait>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = Result<ProviderResult<Release>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait { ... }
    fn get_mr_attachments<'life0, 'life1, 'async_trait>(
        &'life0 self,
        _mr_key: &'life1 str,
    ) -> Pin<Box<dyn Future<Output = Result<Vec<AssetMeta>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait { ... }
    fn download_mr_attachment<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        _mr_key: &'life1 str,
        _asset_id: &'life2 str,
    ) -> Pin<Box<dyn Future<Output = Result<Vec<u8>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait { ... }
    fn delete_mr_attachment<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        _mr_key: &'life1 str,
        _asset_id: &'life2 str,
    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait { ... }
}
Expand description

Provider for working with merge requests / pull requests.

Only provider_name() is required. All other methods have default implementations that return Error::ProviderUnsupported, so providers like ClickUp and Jira only need to override the methods they actually support.

Required Methods§

Source

fn provider_name(&self) -> &'static str

Get the provider name for logging.

Provided Methods§

Source

fn get_merge_requests<'life0, 'async_trait>( &'life0 self, _filter: MrFilter, ) -> Pin<Box<dyn Future<Output = Result<ProviderResult<MergeRequest>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Get a list of merge requests with optional filters.

Source

fn get_merge_request<'life0, 'life1, 'async_trait>( &'life0 self, _key: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<MergeRequest>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Get a single merge request by key (e.g., “mr#123”, “pr#456”).

Source

fn get_discussions<'life0, 'life1, 'async_trait>( &'life0 self, _mr_key: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<ProviderResult<Discussion>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Get discussions/comments for a merge request.

Source

fn get_diffs<'life0, 'life1, 'async_trait>( &'life0 self, _mr_key: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<ProviderResult<FileDiff>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source

fn add_comment<'life0, 'life1, 'async_trait>( &'life0 self, _mr_key: &'life1 str, _input: CreateCommentInput, ) -> Pin<Box<dyn Future<Output = Result<Comment>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source

fn create_merge_request<'life0, 'async_trait>( &'life0 self, _input: CreateMergeRequestInput, ) -> Pin<Box<dyn Future<Output = Result<MergeRequest>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Create a new merge request / pull request.

Source

fn update_merge_request<'life0, 'life1, 'async_trait>( &'life0 self, _key: &'life1 str, _input: UpdateMergeRequestInput, ) -> Pin<Box<dyn Future<Output = Result<MergeRequest>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Update an existing merge request / pull request.

Source

fn get_releases<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<ProviderResult<Release>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Get releases/tags for the repository.

Source

fn get_mr_attachments<'life0, 'life1, 'async_trait>( &'life0 self, _mr_key: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<Vec<AssetMeta>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

List attachments on a merge request (body + discussions).

Source

fn download_mr_attachment<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, _mr_key: &'life1 str, _asset_id: &'life2 str, ) -> Pin<Box<dyn Future<Output = Result<Vec<u8>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Source

fn delete_mr_attachment<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, _mr_key: &'life1 str, _asset_id: &'life2 str, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Implementors§