Add User Control Over State Transitions #7

Merged
seb merged 4 commits from 03/state-transitions into main 2025-07-07 18:13:07 -06:00
Owner

Allows users to set state using the new ent state command from the CLI

Allows users to set state using the new `ent state` command from the CLI
sigil-03 added 3 commits 2025-07-07 13:29:16 -06:00
Owner

Love it.
But I think new_state in Command::State should be Option<State> and should just report the old state if no new one is supplied.

Love it. But I think `new_state` in `Command::State` should be `Option<State>` and should just report the old state if no new one is supplied.
Owner

Also you added Issue::read_state() but you never call it, was that intentional?

Also you added `Issue::read_state()` but you never call it, was that intentional?
Author
Owner

@seb wrote in #7 (comment):

Love it. But I think new_state in Command::State should be Option<State> and should just report the old state if no new one is supplied.

good idea!

@seb wrote in https://git.glyphs.tech/taproot-manufacturing/entomologist/pulls/7#issuecomment-85: > Love it. But I think `new_state` in `Command::State` should be `Option<State>` and should just report the old state if no new one is supplied. good idea!
Author
Owner

@seb wrote in #7 (comment):

Also you added Issue::read_state() but you never call it, was that intentional?

Yeah - i was going to use it in the new_from_dir function, but that needs a little cleanup before it can initialize the state using the built-in function, which I was going to do in a separate MR.

@seb wrote in https://git.glyphs.tech/taproot-manufacturing/entomologist/pulls/7#issuecomment-86: > Also you added `Issue::read_state()` but you never call it, was that intentional? Yeah - i was going to use it in the `new_from_dir` function, but that needs a little cleanup before it can initialize the state using the built-in function, which I was going to do in a separate MR.
sigil-03 added 1 commit 2025-07-07 16:48:16 -06:00
Author
Owner

@seb - added the optional State in the CLI and also made the printout nicer

@seb - added the optional `State` in the CLI and also made the printout nicer
Author
Owner

Example CLI output:

[03@aspen entomologist]$ ent state 198a7d56a19f0579fbc04f2ee9cc234f
issue: 198a7d56a19f0579fbc04f2ee9cc234f
state: new
[03@aspen entomologist]$ ent state 198a7d56a19f0579fbc04f2ee9cc234f inprogress
issue: 198a7d56a19f0579fbc04f2ee9cc234f
state: new -> inprogress
[03@aspen entomologist]$ ent state 198a7d56a19f0579fbc04f2ee9cc234f done
issue: 198a7d56a19f0579fbc04f2ee9cc234f
state: inprogress -> done
Example CLI output: ```log [03@aspen entomologist]$ ent state 198a7d56a19f0579fbc04f2ee9cc234f issue: 198a7d56a19f0579fbc04f2ee9cc234f state: new [03@aspen entomologist]$ ent state 198a7d56a19f0579fbc04f2ee9cc234f inprogress issue: 198a7d56a19f0579fbc04f2ee9cc234f state: new -> inprogress [03@aspen entomologist]$ ent state 198a7d56a19f0579fbc04f2ee9cc234f done issue: 198a7d56a19f0579fbc04f2ee9cc234f state: inprogress -> done ```
seb merged commit bd41704906 into main 2025-07-07 18:13:07 -06:00
seb deleted branch 03/state-transitions 2025-07-07 18:13:15 -06:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: taproot-manufacturing/entomologist#7
No description provided.