Skip to main content

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 parse_tests;
24#[cfg(test)]
25mod tests;
26#[cfg(test)]
27mod uuid_tests;
28
29/// A reference to an issue that identifies a workspace.
30#[derive(Debug, Clone, PartialEq, Eq)]
31pub enum IssueRef {
32    /// A GitHub issue identified by owner, repo, and number.
33    GitHub {
34        /// GitHub organization or user name.
35        owner: String,
36        /// Repository name.
37        repo: String,
38        /// Issue number.
39        number: u64,
40    },
41    /// A Linear issue identified by its UUID, paired with the GitHub repo that
42    /// hosts the code for that project.
43    Linear {
44        /// GitHub organization or user name that hosts the code.
45        owner: String,
46        /// Repository name.
47        repo: String,
48        /// Linear issue UUID.
49        id: String,
50    },
51    /// An Azure DevOps work item paired with an Azure Repos git repository.
52    AzureDevOps {
53        /// Azure DevOps organization name.
54        org: String,
55        /// Azure DevOps project name.
56        project: String,
57        /// Azure Repos git repository name.
58        repo: String,
59        /// Work item ID.
60        id: u64,
61    },
62    /// A Jira issue paired with a GitHub repo that hosts the code.
63    Jira {
64        /// Jira instance host (e.g. `acme.atlassian.net`).
65        host: String,
66        /// Jira issue key (e.g. `PROJ-42`).
67        issue_key: String,
68        /// GitHub organization or user name that hosts the code.
69        owner: String,
70        /// Repository name.
71        repo: String,
72    },
73    /// A GitLab issue identified by owner, repo, and number.
74    GitLab {
75        /// GitLab group or user name.
76        owner: String,
77        /// Repository name.
78        repo: String,
79        /// Issue number.
80        number: u64,
81    },
82    /// A local Centy issue — the repository itself is the source, no remote clone needed.
83    Local {
84        /// Absolute path to the local project repository.
85        project_path: PathBuf,
86        /// Human-readable issue number shown in the branch name.
87        display_number: u32,
88    },
89}