pub enum IssueRef {
GitHub {
owner: String,
repo: String,
number: u64,
},
Linear {
owner: String,
repo: String,
id: String,
},
}Expand description
A reference to an issue that identifies a workspace.
Variants§
GitHub
Linear
A Linear issue identified by its UUID, paired with the GitHub repo that hosts the code for that project.
Implementations§
Source§impl IssueRef
impl IssueRef
Sourcepub fn parse(s: &str) -> Result<Self>
pub fn parse(s: &str) -> Result<Self>
Parse any of the supported input formats:
https://github.com/owner/repo/issues/42worktree://open?owner=X&repo=Y&issue=42worktree://open?url=<encoded-github-url>worktree://open?owner=X&repo=Y&linear_id=<uuid>owner/repo#42owner/repo@<linear-uuid>
Sourcepub fn parse_with_options(s: &str) -> Result<(Self, DeepLinkOptions)>
pub fn parse_with_options(s: &str) -> Result<(Self, DeepLinkOptions)>
Like [parse] but also returns any DeepLinkOptions embedded in a
worktree:// URL (e.g. the editor query param).
Sourcepub fn workspace_dir_name(&self) -> String
pub fn workspace_dir_name(&self) -> String
Directory name used inside the bare clone for this worktree.
Sourcepub fn branch_name(&self) -> String
pub fn branch_name(&self) -> String
Git branch name for this issue worktree.
Sourcepub fn temp_path(&self) -> PathBuf
pub fn temp_path(&self) -> PathBuf
Path to the worktree checkout: ~/worktrees/github/owner/repo/issue-N
Sourcepub fn bare_clone_path(&self) -> PathBuf
pub fn bare_clone_path(&self) -> PathBuf
Path to the bare clone: ~/worktrees/github/owner/repo
Trait Implementations§
impl StructuralPartialEq for IssueRef
Auto Trait Implementations§
impl Freeze for IssueRef
impl RefUnwindSafe for IssueRef
impl Send for IssueRef
impl Sync for IssueRef
impl Unpin for IssueRef
impl UnsafeUnpin for IssueRef
impl UnwindSafe for IssueRef
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
Mutably borrows from an owned value. Read more