Skip to main content

GitLab

Struct GitLab 

Source
pub struct GitLab { /* private fields */ }

Implementations§

Source§

impl GitLab

Source

pub fn new(host: &str) -> Self

Source

pub fn rest(&mut self) -> &mut Rest

The REST client, for the CI reads wait makes.

Source

pub fn number(&mut self, target: &Target) -> Result<Option<u64>, Failure>

The MR a target names: a number as is, a branch through its open MR, else its newest. None when there is none.

Trait Implementations§

Source§

impl Host for GitLab

Source§

fn merge_base(&mut self, pr: &PrThreads) -> Result<String, String>

GitLab’s diff is taken against the base_sha of the MR’s diff refs, which is the merge base.

Source§

fn forge(&self) -> Forge

Source§

fn lacks(&mut self, feature: Feature) -> Option<String>

Why the forge cannot do feature, or None when it can.
Source§

fn fetch(&mut self, lookups: Vec<Lookup>) -> Result<FetchResult, String>

The PRs the lookups name, in the order named, as pr status reports them before attention codes are derived.
Source§

fn threads( &mut self, target: &Target, extra: bool, bots: &[String], ) -> Result<Option<PrThreads>, String>

A PR’s review threads, and with extra its reviews and conversation comments. None when there is no such PR.
Source§

fn pushed_at(&mut self, pr: &PrThreads, sha: &str) -> Result<Pushed, Lookup>

When sha (a prefix) was pushed to the PR.
Source§

fn files( &mut self, pr: &PrThreads, oid: &str, paths: &[String], ) -> Result<Vec<(String, String)>, String>

Files at commit oid, as (path, text); a file that cannot be read is left out.
Source§

fn on_branch(&mut self, pr: &PrThreads, head: &str) -> Result<bool, String>

Whether head is on the PR’s branch, for a head this clone cannot place.
Source§

fn reply( &mut self, pr: &PrThreads, thread: &Thread, body: &str, ) -> Result<String, String>

Posts body as a reply in thread, returning the reply’s URL.
Source§

fn set_resolved( &mut self, pr: &PrThreads, thread: &Thread, resolved: bool, ) -> Result<(), String>

Resolves or unresolves thread.

Auto Trait Implementations§

§

impl !RefUnwindSafe for GitLab

§

impl !UnwindSafe for GitLab

§

impl Forget for GitLab

§

impl Freeze for GitLab

§

impl Move for GitLab

§

impl Send for GitLab

§

impl Sync for GitLab

§

impl Unpin for GitLab

§

impl UnsafeUnpin for GitLab

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