Skip to main content

TriageAction

Enum TriageAction 

Source
pub enum TriageAction {
    List {
        age: bool,
        count: bool,
    },
    Status,
    Accept {
        issue: String,
        reason: Option<String>,
        to: Option<String>,
        actor: Option<String>,
    },
    Decline {
        issue: String,
        reason: Option<String>,
        actor: Option<String>,
    },
    Duplicate {
        issue: String,
        of: String,
        reason: Option<String>,
        actor: Option<String>,
    },
    Defer {
        issue: String,
        reason: Option<String>,
        actor: Option<String>,
    },
    Batch {
        select: Option<String>,
        filter: Option<String>,
        decision: String,
        reason: Option<String>,
        actor: Option<String>,
        of: Option<String>,
        to: Option<String>,
        apply: bool,
    },
}
Expand description

The tix triage tree (contracts/cli-surface.md, WP05 T023–T025).

list and status are read-only queue views; the four decision verbs take a single issue; batch is the selection-shaped twin of tix bulk, preview by default and writing only under an explicit --apply.

§Why the reason flag is Option on accept and the rest

contracts/decision-history.md splits it: decline, duplicate and defer require a reason, accept records one when supplied. A required clap argument on three of the four would make the fourth’s absence look like an oversight, and — more importantly — the enforcement belongs to the service, which refuses missing_reason before any write on every surface (NFR-003). The flag is therefore optional everywhere and the rule is the service’s, so the CLI, TUI and MCP cannot end up with three different ideas of which decision needs one. tix triage decline 1 with no --reason still fails, at the service, with the contract’s own kind.

Variants§

§

List

Read the inbox queue: one row per entry (FR-001)

Fields

§age: bool

Sort by entry age, oldest first; an unknown age sorts last

§count: bool

Print the counts only, with no entries

§

Status

Read the inbox summary: decision counts and the age histogram (FR-005)

§

Accept

Accept: move into the normal workflow, validated by #183’s transition policy

Fields

§issue: String

Issue number, filename fragment or unique title fragment

§reason: Option<String>

Reason recorded in History; accept records one when supplied

§to: Option<String>

Target column; defaults to [triage].accepted_status

§actor: Option<String>

Who decided; defaults to the git identity

§

Decline

Decline: move to [triage].declined_status; never deletes or archives

Fields

§issue: String

Issue number, filename fragment or unique title fragment

§reason: Option<String>

Why it is declined (required)

§actor: Option<String>

Who decided; defaults to the git identity

§

Duplicate

Duplicate: record a typed duplicates relation; never merges files

Fields

§issue: String

Issue number, filename fragment or unique title fragment

§of: String

The issue this one duplicates

§reason: Option<String>

Why it is a duplicate (required)

§actor: Option<String>

Who decided; defaults to the git identity

§

Defer

Defer: stay in the inbox with a refreshed entry time

Fields

§issue: String

Issue number, filename fragment or unique title fragment

§reason: Option<String>

Why it is deferred (required)

§actor: Option<String>

Who decided; defaults to the git identity

§

Batch

One decision across a selection: preview by default, --apply to write

Fields

§select: Option<String>

Comma-separated selectors: number, filename or title fragment

§filter: Option<String>

A tix list --filter query selecting the issues

§decision: String

Which decision to make: accept | decline | duplicate | defer

§reason: Option<String>

Reason recorded on every applied event; required for three of four

§actor: Option<String>

Who decided; defaults to the git identity

§of: Option<String>

The duplicate target selector, for --decision duplicate

§to: Option<String>

The accept target column, for --decision accept

§apply: bool

Apply the previewed plan; without it nothing is written

Trait Implementations§

Source§

impl FromArgMatches for TriageAction

Source§

fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>

Instantiate Self from ArgMatches, parsing the arguments as needed. Read more
Source§

fn from_arg_matches_mut( __clap_arg_matches: &mut ArgMatches, ) -> Result<Self, Error>

Instantiate Self from ArgMatches, parsing the arguments as needed. Read more
Source§

fn update_from_arg_matches( &mut self, __clap_arg_matches: &ArgMatches, ) -> Result<(), Error>

Assign values from ArgMatches to self.
Source§

fn update_from_arg_matches_mut<'b>( &mut self, __clap_arg_matches: &mut ArgMatches, ) -> Result<(), Error>

Assign values from ArgMatches to self.
Source§

impl Subcommand for TriageAction

Source§

fn augment_subcommands<'b>(__clap_app: Command) -> Command

Append to Command so it can instantiate Self via FromArgMatches::from_arg_matches_mut Read more
Source§

fn augment_subcommands_for_update<'b>(__clap_app: Command) -> Command

Append to Command so it can instantiate self via FromArgMatches::update_from_arg_matches_mut Read more
Source§

fn has_subcommand(__clap_name: &str) -> bool

Test whether Self can parse a specific subcommand

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.