worktree_io/issue/mod.rs
1use std::path::PathBuf;
2
3mod impls;
4mod parse;
5mod paths;
6
7#[cfg(test)]
8mod tests;
9
10#[cfg(test)]
11mod linear_tests;
12
13#[cfg(test)]
14mod azure_tests;
15
16#[cfg(test)]
17mod azure_paths_tests;
18
19#[cfg(test)]
20mod uuid_tests;
21
22#[cfg(test)]
23mod parse_tests;
24
25#[cfg(test)]
26mod local_tests;
27
28/// Options extracted from a `worktree://` deep link.
29#[derive(Debug, Clone, Default)]
30pub struct DeepLinkOptions {
31 /// Editor override from the `editor` query param. May be a symbolic name
32 /// (`cursor`, `code`, `zed`, `nvim`, etc.) or a raw percent-decoded command.
33 pub editor: Option<String>,
34}
35
36/// A reference to an issue that identifies a workspace.
37#[derive(Debug, Clone, PartialEq, Eq)]
38pub enum IssueRef {
39 /// A GitHub issue identified by owner, repo, and number.
40 GitHub {
41 /// GitHub organization or user name.
42 owner: String,
43 /// Repository name.
44 repo: String,
45 /// Issue number.
46 number: u64,
47 },
48 /// A Linear issue identified by its UUID, paired with the GitHub repo that
49 /// hosts the code for that project.
50 Linear {
51 /// GitHub organization or user name that hosts the code.
52 owner: String,
53 /// Repository name.
54 repo: String,
55 /// Linear issue UUID.
56 id: String,
57 },
58 /// An Azure DevOps work item paired with an Azure Repos git repository.
59 AzureDevOps {
60 /// Azure DevOps organization name.
61 org: String,
62 /// Azure DevOps project name.
63 project: String,
64 /// Azure Repos git repository name.
65 repo: String,
66 /// Work item ID.
67 id: u64,
68 },
69 /// A local Centy issue — the repository itself is the source, no remote clone needed.
70 Local {
71 /// Absolute path to the local project repository.
72 project_path: PathBuf,
73 /// Human-readable issue number shown in the branch name.
74 display_number: u32,
75 },
76}