pub struct ForgeRemote {
pub command_working_directory: Option<PathBuf>,
pub forge_kind: ForgeKind,
pub host: String,
pub namespace: String,
pub project: String,
pub repo_url: String,
pub web_url: String,
}Expand description
Normalized repository remote metadata for one supported forge.
Fields§
§command_working_directory: Option<PathBuf>Repository worktree used when forge CLI commands need local git context.
forge_kind: ForgeKindForge family inferred from the repository remote.
host: StringForge hostname used for browser and API calls.
HTTPS remotes keep any explicit web/API port, while SSH transport ports are stripped during remote normalization.
namespace: StringRepository namespace or owner path.
project: StringRepository name without a trailing .git suffix.
repo_url: StringCredential-free remote URL suitable for display and diagnostics.
web_url: StringBrowser-openable repository URL derived from the remote.
Implementations§
Source§impl ForgeRemote
impl ForgeRemote
Sourcepub fn with_command_working_directory(self, working_directory: PathBuf) -> Self
pub fn with_command_working_directory(self, working_directory: PathBuf) -> Self
Returns one remote copy that runs forge CLI commands from
working_directory.
Sourcepub fn project_path(&self) -> String
pub fn project_path(&self) -> String
Returns the <namespace>/<project> path used by forge CLIs and URLs.
Sourcepub fn review_request_creation_url(
&self,
source_branch: &str,
target_branch: &str,
) -> Result<String, ReviewRequestError>
pub fn review_request_creation_url( &self, source_branch: &str, target_branch: &str, ) -> Result<String, ReviewRequestError>
Returns the browser-openable URL that starts one new pull request or
review request for source_branch into target_branch.
§Errors
Returns ReviewRequestError::OperationFailed when the stored
repository web URL is invalid or cannot be converted into a forge
review-request creation URL.
Trait Implementations§
Source§impl Clone for ForgeRemote
impl Clone for ForgeRemote
Source§impl Debug for ForgeRemote
impl Debug for ForgeRemote
impl Eq for ForgeRemote
Source§impl PartialEq for ForgeRemote
impl PartialEq for ForgeRemote
impl StructuralPartialEq for ForgeRemote
Auto Trait Implementations§
impl Forget for ForgeRemote
impl Freeze for ForgeRemote
impl Move for ForgeRemote
impl RefUnwindSafe for ForgeRemote
impl Send for ForgeRemote
impl Sync for ForgeRemote
impl Unpin for ForgeRemote
impl UnsafeUnpin for ForgeRemote
impl UnwindSafe for ForgeRemote
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.