Skip to main content

GitLabAdapter

Struct GitLabAdapter 

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

GitLab API adapter

Implementations§

Source§

impl GitLabAdapter

Source

pub fn new(base_url: Option<&str>) -> Self

Create a new GitLab adapter

Trait Implementations§

Source§

impl HostingPlatform for GitLabAdapter

Source§

fn platform_type(&self) -> PlatformType

Platform type identifier
Source§

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

Get authentication token for API calls
Source§

fn create_pull_request<'life0, 'life1, 'life2, 'life3, 'life4, 'life5, 'life6, 'async_trait>( &'life0 self, owner: &'life1 str, repo: &'life2 str, head: &'life3 str, base: &'life4 str, title: &'life5 str, body: Option<&'life6 str>, draft: bool, ) -> Pin<Box<dyn Future<Output = Result<PRCreateResult, PlatformError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait, 'life4: 'async_trait, 'life5: 'async_trait, 'life6: 'async_trait,

Create a pull request
Source§

fn get_pull_request<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, owner: &'life1 str, repo: &'life2 str, pull_number: u64, ) -> Pin<Box<dyn Future<Output = Result<PullRequest, PlatformError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Get pull request details
Source§

fn update_pull_request_body<'life0, 'life1, 'life2, 'life3, 'async_trait>( &'life0 self, owner: &'life1 str, repo: &'life2 str, pull_number: u64, body: &'life3 str, ) -> Pin<Box<dyn Future<Output = Result<(), PlatformError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait,

Update pull request body
Source§

fn merge_pull_request<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, owner: &'life1 str, repo: &'life2 str, pull_number: u64, method: Option<MergeMethod>, delete_branch: bool, ) -> Pin<Box<dyn Future<Output = Result<bool, PlatformError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Merge a pull request
Source§

fn find_pr_by_branch<'life0, 'life1, 'life2, 'life3, 'async_trait>( &'life0 self, owner: &'life1 str, repo: &'life2 str, branch: &'life3 str, ) -> Pin<Box<dyn Future<Output = Result<Option<PRCreateResult>, PlatformError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait,

Find an open PR by branch name
Source§

fn is_pull_request_approved<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, owner: &'life1 str, repo: &'life2 str, pull_number: u64, ) -> Pin<Box<dyn Future<Output = Result<bool, PlatformError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Check if PR is approved
Source§

fn get_pull_request_reviews<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, owner: &'life1 str, repo: &'life2 str, pull_number: u64, ) -> Pin<Box<dyn Future<Output = Result<Vec<PRReview>, PlatformError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Get reviews for a PR
Source§

fn create_pull_request_review<'life0, 'life1, 'life2, 'life3, 'async_trait>( &'life0 self, _owner: &'life1 str, _repo: &'life2 str, _pull_number: u64, _event: ReviewEvent, _body: Option<&'life3 str>, ) -> Pin<Box<dyn Future<Output = Result<(), PlatformError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait,

Create a review on a PR
Source§

fn get_status_checks<'life0, 'life1, 'life2, 'life3, 'async_trait>( &'life0 self, owner: &'life1 str, repo: &'life2 str, ref_name: &'life3 str, ) -> Pin<Box<dyn Future<Output = Result<StatusCheckResult, PlatformError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait,

Get CI/CD status checks for a commit
Source§

fn get_allowed_merge_methods<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, _owner: &'life1 str, _repo: &'life2 str, ) -> Pin<Box<dyn Future<Output = Result<AllowedMergeMethods, PlatformError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Get allowed merge methods for a repository
Source§

fn get_pull_request_diff<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, owner: &'life1 str, repo: &'life2 str, pull_number: u64, ) -> Pin<Box<dyn Future<Output = Result<String, PlatformError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Get the diff for a pull request
Source§

fn parse_repo_url(&self, url: &str) -> Option<ParsedRepoInfo>

Parse a git URL to extract owner/repo information
Source§

fn matches_url(&self, url: &str) -> bool

Check if a URL belongs to this platform
Source§

fn create_repository<'life0, 'life1, 'life2, 'life3, 'async_trait>( &'life0 self, owner: &'life1 str, name: &'life2 str, description: Option<&'life3 str>, private: bool, ) -> Pin<Box<dyn Future<Output = Result<String, PlatformError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait,

Create a new repository on the platform Read more
Source§

fn delete_repository<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, owner: &'life1 str, name: &'life2 str, ) -> Pin<Box<dyn Future<Output = Result<(), PlatformError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Delete a repository from the platform Read more
Source§

fn update_pull_request<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>( &'life0 self, owner: &'life1 str, repo: &'life2 str, pull_number: u64, title: Option<&'life3 str>, body: Option<&'life4 str>, ) -> Pin<Box<dyn Future<Output = Result<(), PlatformError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait, 'life4: 'async_trait,

Update pull request title and/or body Read more
Source§

fn list_pull_requests<'life0, 'life1, 'life2, 'life3, 'async_trait>( &'life0 self, _owner: &'life1 str, _repo: &'life2 str, _filter: &'life3 PRListFilter, ) -> Pin<Box<dyn Future<Output = Result<Vec<PullRequest>, PlatformError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait,

List pull requests for a repository
Source§

fn resolve_repo<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, _owner: &'life1 str, _repo: &'life2 str, ) -> Pin<Box<dyn Future<Output = Result<Option<(String, String)>, PlatformError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Check if a repository has been renamed by querying the platform API. Read more
Source§

fn update_branch<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, _owner: &'life1 str, _repo: &'life2 str, _pull_number: u64, ) -> Pin<Box<dyn Future<Output = Result<bool, PlatformError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Update a pull request branch (merge base into head) Read more
Source§

fn enable_auto_merge<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, _owner: &'life1 str, _repo: &'life2 str, _pull_number: u64, _method: Option<MergeMethod>, ) -> Pin<Box<dyn Future<Output = Result<bool, PlatformError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Enable auto-merge for a pull request Read more
Source§

fn create_release<'life0, 'life1, 'life2, 'life3, 'life4, 'life5, 'life6, 'async_trait>( &'life0 self, _owner: &'life1 str, _repo: &'life2 str, _tag: &'life3 str, _name: &'life4 str, _body: Option<&'life5 str>, _target_commitish: &'life6 str, _draft: bool, _prerelease: bool, ) -> Pin<Box<dyn Future<Output = Result<ReleaseResult, PlatformError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait, 'life4: 'async_trait, 'life5: 'async_trait, 'life6: 'async_trait,

Create a release on the platform with a tag Read more
Source§

fn list_issues<'life0, 'life1, 'life2, 'life3, 'async_trait>( &'life0 self, _owner: &'life1 str, _repo: &'life2 str, _filter: &'life3 IssueListFilter, ) -> Pin<Box<dyn Future<Output = Result<Vec<Issue>, PlatformError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait,

List issues for a repository
Source§

fn create_issue<'life0, 'life1, 'life2, 'life3, 'async_trait>( &'life0 self, _owner: &'life1 str, _repo: &'life2 str, _options: &'life3 IssueCreateOptions, ) -> Pin<Box<dyn Future<Output = Result<IssueCreateResult, PlatformError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait,

Create an issue on a repository
Source§

fn get_issue<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, _owner: &'life1 str, _repo: &'life2 str, _issue_number: u64, ) -> Pin<Box<dyn Future<Output = Result<Issue, PlatformError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Get a single issue by number
Source§

fn close_issue<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, _owner: &'life1 str, _repo: &'life2 str, _issue_number: u64, ) -> Pin<Box<dyn Future<Output = Result<(), PlatformError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Close an issue
Source§

fn reopen_issue<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, _owner: &'life1 str, _repo: &'life2 str, _issue_number: u64, ) -> Pin<Box<dyn Future<Output = Result<(), PlatformError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Reopen an issue
Source§

fn check_branch_exists<'life0, 'life1, 'life2, 'life3, 'async_trait>( &'life0 self, _owner: &'life1 str, _repo: &'life2 str, _branch: &'life3 str, ) -> Pin<Box<dyn Future<Output = Result<bool, PlatformError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait,

Check if a branch exists on the remote Read more
Source§

fn generate_linked_pr_comment(&self, links: &[LinkedPRRef]) -> String

Generate HTML comment for linked PR tracking
Source§

fn parse_linked_pr_comment(&self, body: &str) -> Vec<LinkedPRRef>

Parse linked PR references from PR body

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, 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<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