worktree_io/issue/mod.rs
1use std::path::PathBuf;
2
3mod deep_link;
4mod impls;
5mod parse;
6mod paths;
7
8pub use deep_link::DeepLinkOptions;
9
10#[cfg(test)]
11mod azure_paths_tests;
12#[cfg(test)]
13mod azure_tests;
14#[cfg(test)]
15mod gitlab_tests;
16#[cfg(test)]
17mod jira_tests;
18#[cfg(test)]
19mod linear_tests;
20#[cfg(test)]
21mod local_tests;
22#[cfg(test)]
23mod multi_dir_name_tests;
24#[cfg(test)]
25mod parse_tests;
26#[cfg(test)]
27mod tests;
28#[cfg(test)]
29mod uuid_tests;
30
31/// A reference to an issue that identifies a workspace.
32#[derive(Debug, Clone, PartialEq, Eq)]
33pub enum IssueRef {
34 /// A GitHub issue identified by owner, repo, and number.
35 GitHub {
36 /// GitHub organization or user name.
37 owner: String,
38 /// Repository name.
39 repo: String,
40 /// Issue number.
41 number: u64,
42 },
43 /// A Linear issue identified by its UUID, paired with the GitHub repo that
44 /// hosts the code for that project.
45 Linear {
46 /// GitHub organization or user name that hosts the code.
47 owner: String,
48 /// Repository name.
49 repo: String,
50 /// Linear issue UUID.
51 id: String,
52 },
53 /// An Azure DevOps work item paired with an Azure Repos git repository.
54 AzureDevOps {
55 /// Azure DevOps organization name.
56 org: String,
57 /// Azure DevOps project name.
58 project: String,
59 /// Azure Repos git repository name.
60 repo: String,
61 /// Work item ID.
62 id: u64,
63 },
64 /// A Jira issue paired with a GitHub repo that hosts the code.
65 Jira {
66 /// Jira instance host (e.g. `acme.atlassian.net`).
67 host: String,
68 /// Jira issue key (e.g. `PROJ-42`).
69 issue_key: String,
70 /// GitHub organization or user name that hosts the code.
71 owner: String,
72 /// Repository name.
73 repo: String,
74 },
75 /// A GitLab issue identified by owner, repo, and number.
76 GitLab {
77 /// GitLab group or user name.
78 owner: String,
79 /// Repository name.
80 repo: String,
81 /// Issue number.
82 number: u64,
83 },
84 /// A local Centy issue — the repository itself is the source, no remote clone needed.
85 Local {
86 /// Absolute path to the local project repository.
87 project_path: PathBuf,
88 /// Human-readable issue number shown in the branch name.
89 display_number: u32,
90 },
91}