pub enum IssueRef {
GitHub {
owner: String,
repo: String,
number: u64,
},
Linear {
owner: String,
repo: String,
id: String,
},
AzureDevOps {
org: String,
project: String,
repo: String,
id: u64,
},
Local {
project_path: PathBuf,
display_number: u32,
},
}Expand description
A reference to an issue that identifies a workspace.
Variants§
GitHub
A GitHub issue identified by owner, repo, and number.
Fields
Linear
A Linear issue identified by its UUID, paired with the GitHub repo that hosts the code for that project.
Fields
AzureDevOps
An Azure DevOps work item paired with an Azure Repos git repository.
Fields
Local
A local Centy issue — the repository itself is the source, no remote clone needed.
Implementations§
Source§impl IssueRef
impl IssueRef
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.
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>
§Errors
Returns an error if s does not match any supported format or if the
extracted values (e.g. issue number) are invalid.
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).
§Errors
Returns an error if s cannot be parsed as a valid issue reference.
Source§impl IssueRef
impl IssueRef
Sourcepub fn temp_path(&self) -> PathBuf
pub fn temp_path(&self) -> PathBuf
Path to the worktree checkout.
For Local: ~/worktrees/local/{project_name}/issue-{display_number}
For others: ~/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 (or the local repo itself for Local).
§Panics
Panics if the home directory cannot be determined.