tix/cli/cli_triage.rs
1#[allow(clippy::wildcard_imports)]
2use super::*;
3
4#[derive(Subcommand)]
5pub enum TriageAction {
6 /// Read the inbox queue: one row per entry (FR-001)
7 List {
8 /// Sort by entry age, oldest first; an unknown age sorts last
9 #[arg(long)]
10 age: bool,
11 /// Print the counts only, with no entries
12 #[arg(long)]
13 count: bool,
14 },
15 /// Read the inbox summary: decision counts and the age histogram (FR-005)
16 Status,
17 /// Accept: move into the normal workflow, validated by #183's transition policy
18 Accept {
19 /// Issue number, filename fragment or unique title fragment
20 issue: String,
21 /// Reason recorded in History; accept records one when supplied
22 #[arg(long)]
23 reason: Option<String>,
24 /// Target column; defaults to `[triage].accepted_status`
25 #[arg(long, value_name = "COLUMN")]
26 to: Option<String>,
27 /// Who decided; defaults to the git identity
28 #[arg(long)]
29 actor: Option<String>,
30 },
31 /// Decline: move to `[triage].declined_status`; never deletes or archives
32 Decline {
33 /// Issue number, filename fragment or unique title fragment
34 issue: String,
35 /// Why it is declined (required)
36 #[arg(long)]
37 reason: Option<String>,
38 /// Who decided; defaults to the git identity
39 #[arg(long)]
40 actor: Option<String>,
41 },
42 /// Duplicate: record a typed `duplicates` relation; never merges files
43 Duplicate {
44 /// Issue number, filename fragment or unique title fragment
45 issue: String,
46 /// The issue this one duplicates
47 #[arg(long, value_name = "ISSUE")]
48 of: String,
49 /// Why it is a duplicate (required)
50 #[arg(long)]
51 reason: Option<String>,
52 /// Who decided; defaults to the git identity
53 #[arg(long)]
54 actor: Option<String>,
55 },
56 /// Defer: stay in the inbox with a refreshed entry time
57 Defer {
58 /// Issue number, filename fragment or unique title fragment
59 issue: String,
60 /// Why it is deferred (required)
61 #[arg(long)]
62 reason: Option<String>,
63 /// Who decided; defaults to the git identity
64 #[arg(long)]
65 actor: Option<String>,
66 },
67 /// One decision across a selection: preview by default, `--apply` to write
68 Batch {
69 /// Comma-separated selectors: number, filename or title fragment
70 #[arg(long, value_name = "LIST")]
71 select: Option<String>,
72 /// A `tix list --filter` query selecting the issues
73 #[arg(long, value_name = "QUERY")]
74 filter: Option<String>,
75 /// Which decision to make: accept | decline | duplicate | defer
76 #[arg(long, value_name = "KIND")]
77 decision: String,
78 /// Reason recorded on every applied event; required for three of four
79 #[arg(long)]
80 reason: Option<String>,
81 /// Who decided; defaults to the git identity
82 #[arg(long)]
83 actor: Option<String>,
84 /// The duplicate target selector, for `--decision duplicate`
85 #[arg(long, value_name = "ISSUE")]
86 of: Option<String>,
87 /// The accept target column, for `--decision accept`
88 #[arg(long, value_name = "COLUMN")]
89 to: Option<String>,
90 /// Apply the previewed plan; without it nothing is written
91 #[arg(long)]
92 apply: bool,
93 },
94}