pub struct Forge(/* private fields */);Expand description
Represents a code forge (hosting service) like GitHub, GitLab, etc.
Implementations§
Source§impl Forge
impl Forge
Sourcepub fn get_proposal_by_url(&self, url: &Url) -> Result<MergeProposal, Error>
pub fn get_proposal_by_url(&self, url: &Url) -> Result<MergeProposal, Error>
Retrieves a merge proposal by its URL.
Sourcepub fn get_web_url(
&self,
branch: &(dyn PyBranch + 'static),
) -> Result<Url, Error>
pub fn get_web_url( &self, branch: &(dyn PyBranch + 'static), ) -> Result<Url, Error>
Returns the web URL for a given branch on this forge.
Sourcepub fn forge_kind(&self) -> String
pub fn forge_kind(&self) -> String
Returns the kind of forge (e.g., GitHub, GitLab).
Sourcepub fn forge_name(&self) -> String
pub fn forge_name(&self) -> String
Returns the name of the forge.
Sourcepub fn merge_proposal_description_format(&self) -> String
pub fn merge_proposal_description_format(&self) -> String
Returns the format used for merge proposal descriptions on this forge.
Sourcepub fn supports_merge_proposal_commit_message(&self) -> bool
pub fn supports_merge_proposal_commit_message(&self) -> bool
Checks if this forge supports setting commit messages for merge proposals.
Sourcepub fn supports_merge_proposal_title(&self) -> bool
pub fn supports_merge_proposal_title(&self) -> bool
Checks if this forge supports setting titles for merge proposals.
Sourcepub fn supports_merge_proposal_labels(&self) -> bool
pub fn supports_merge_proposal_labels(&self) -> bool
Checks if this forge supports adding labels to merge proposals.
Sourcepub fn get_proposer(
&self,
from_branch: &(dyn PyBranch + 'static),
to_branch: &(dyn PyBranch + 'static),
) -> Result<ProposalBuilder, Error>
pub fn get_proposer( &self, from_branch: &(dyn PyBranch + 'static), to_branch: &(dyn PyBranch + 'static), ) -> Result<ProposalBuilder, Error>
Creates a proposal builder for a merge proposal from one branch to another.
Sourcepub fn iter_my_proposals(
&self,
status: Option<MergeProposalStatus>,
author: Option<String>,
) -> Result<impl Iterator<Item = MergeProposal>, Error>
pub fn iter_my_proposals( &self, status: Option<MergeProposalStatus>, author: Option<String>, ) -> Result<impl Iterator<Item = MergeProposal>, Error>
Returns an iterator over merge proposals owned by the current user.
Sourcepub fn get_derived_branch(
&self,
main_branch: &(dyn PyBranch + 'static),
name: &str,
owner: Option<&str>,
preferred_schemes: Option<&[&str]>,
) -> Result<Box<dyn Branch>, Error>
pub fn get_derived_branch( &self, main_branch: &(dyn PyBranch + 'static), name: &str, owner: Option<&str>, preferred_schemes: Option<&[&str]>, ) -> Result<Box<dyn Branch>, Error>
Gets a branch derived from a main branch with the given name and optional owner.
Sourcepub fn iter_proposals(
&self,
source_branch: &(dyn PyBranch + 'static),
target_branch: &(dyn PyBranch + 'static),
status: MergeProposalStatus,
) -> Result<impl Iterator<Item = MergeProposal>, Error>
pub fn iter_proposals( &self, source_branch: &(dyn PyBranch + 'static), target_branch: &(dyn PyBranch + 'static), status: MergeProposalStatus, ) -> Result<impl Iterator<Item = MergeProposal>, Error>
Returns an iterator over merge proposals from one branch to another.
Sourcepub fn publish_derived(
&self,
local_branch: &(dyn PyBranch + 'static),
base_branch: &(dyn PyBranch + 'static),
name: &str,
overwrite: Option<bool>,
owner: Option<&str>,
revision_id: Option<&RevisionId>,
tag_selector: Option<Box<dyn Fn(String) -> bool>>,
) -> Result<(Box<dyn Branch>, Url), Error>
pub fn publish_derived( &self, local_branch: &(dyn PyBranch + 'static), base_branch: &(dyn PyBranch + 'static), name: &str, overwrite: Option<bool>, owner: Option<&str>, revision_id: Option<&RevisionId>, tag_selector: Option<Box<dyn Fn(String) -> bool>>, ) -> Result<(Box<dyn Branch>, Url), Error>
Publishes a derived branch and returns the branch and its URL.
Sourcepub fn get_push_url(&self, branch: &(dyn PyBranch + 'static)) -> Url
pub fn get_push_url(&self, branch: &(dyn PyBranch + 'static)) -> Url
Returns the URL for pushing to a branch on this forge.
Trait Implementations§
Source§impl<'a, 'py> FromPyObject<'a, 'py> for Forge
impl<'a, 'py> FromPyObject<'a, 'py> for Forge
Source§impl<'py> IntoPyObject<'py> for Forge
impl<'py> IntoPyObject<'py> for Forge
Source§type Output = Bound<'py, <Forge as IntoPyObject<'py>>::Target>
type Output = Bound<'py, <Forge as IntoPyObject<'py>>::Target>
Source§type Error = Infallible
type Error = Infallible
Source§fn into_pyobject(
self,
py: Python<'py>,
) -> Result<<Forge as IntoPyObject<'py>>::Output, <Forge as IntoPyObject<'py>>::Error>
fn into_pyobject( self, py: Python<'py>, ) -> Result<<Forge as IntoPyObject<'py>>::Output, <Forge as IntoPyObject<'py>>::Error>
Auto Trait Implementations§
impl Freeze for Forge
impl !RefUnwindSafe for Forge
impl Send for Forge
impl Sync for Forge
impl Unpin for Forge
impl UnwindSafe for Forge
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<'py, T> IntoPyObjectExt<'py> for Twhere
T: IntoPyObject<'py>,
impl<'py, T> IntoPyObjectExt<'py> for Twhere
T: IntoPyObject<'py>,
Source§fn into_bound_py_any(self, py: Python<'py>) -> Result<Bound<'py, PyAny>, PyErr>
fn into_bound_py_any(self, py: Python<'py>) -> Result<Bound<'py, PyAny>, PyErr>
self into an owned Python object, dropping type information.Source§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> PyErrArguments for T
impl<T> PyErrArguments for T
Source§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
Source§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.