Shorter ergonomic commands for all the issue stuff#10
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
This PR simplifies the bmo CLI by promoting issue-related subcommands to the top level (e.g., bmo list instead of bmo issue list) while retaining the bmo issue <cmd> form for compatibility, and updates documentation accordingly. It also adjusts some issue-list flags and bumps the crate version.
Changes:
- Add top-level issue commands (
bmo create/list/show/...) alongside the existingbmo issue <cmd>namespace. - Update issue list flags (
-a/--all,-k/--kind, remove-ashort for--assignee) and refresh docs/examples to match. - Enhance
agent-initoutput (recent epic + board done truncation) and bump version to0.6.0.
Reviewed changes
Copilot reviewed 9 out of 10 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| src/main.rs | Dispatches new top-level issue-related commands to existing handlers. |
| src/cli/mod.rs | Adds top-level issue subcommands (and aliases like ls) while keeping issue as a backward-compatible namespace. |
| src/cli/issue/move_cmd.rs | Tweaks clap arg metadata for --status and minor refactor in run(). |
| src/cli/issue/list.rs | Updates list flags (-a for all, -k for kind) and removes short -a for assignee. |
| src/cli/agent_init.rs | Updates cheat sheet text; changes board construction and adds recent_epic to outputs. |
| docs/commands.md | Updates CLI docs to show short-form commands and new flag aliases/examples. |
| docs/agents.md | Updates agent workflow examples to use short-form commands. |
| README.md | Updates quickstart to use bmo create / bmo list. |
| Cargo.toml | Version bump to 0.6.0. |
| Cargo.lock | Lockfile version update for bmo. |
Comments suppressed due to low confidence (2)
src/cli/agent_init.rs:105
repo.list_issues(IssueFilter::default())is executed twice (foractive_issuesand again forall_issues_for_next). This is redundant DB work; consider reusingactive_issuesfor the DAG/next computation (or otherwise avoid the second full query).
// 4. next (unblocked, work-ready issues)
let all_issues_for_next = repo.list_issues(IssueFilter::default())?;
let all_relations = repo.list_all_relations()?;
let dag = Dag::build(&all_issues_for_next, &all_relations);
topological_levels(&dag)?;
let next: Vec<_> = find_ready(&dag).into_iter().take(10).cloned().collect();
src/cli/agent_init.rs:245
run_with_dir_inneralso performs a secondrepo.list_issues(IssueFilter::default())forall_issues_for_nexteven thoughactive_issueswas just fetched with the same filter. Reuse the first result to avoid an extra DB query.
let all_issues_for_next = repo.list_issues(IssueFilter::default())?;
let all_relations = repo.list_all_relations()?;
let dag = Dag::build(&all_issues_for_next, &all_relations);
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request represents an intent to simplify the CLI with a focus on issue-related subcommands.
I found that I kept typing
bmo issue ls -aorbmo ls -aand I wanted these commands to work, so that's the goal with this PR.The
issuesubcommand (e.g.bmo issue ls) can now be invoked directly (e.g.,bmo create,bmo list) without theissueprefix, but the old form withissuesubcommand is still respected for backward compatibility.These
IssueFilteroptions have also been slightly reworked:-afor--all(-aused to be a short option for--asignee)--assigneeonly has long-option now-kinstead of-Tfor--kindWarning
These are breaking changes for existing tooling:
-afor--alland removed-afor--assignee.-Tas a short option forkindand replaced it with-k.The documentation has also been updated to show the new forms, clarify usage, and improve consistency of flags and examples.
This PR also includes some modification to the
agent-initcommand: it was spitting out 500 issues, so I modified it to print a smaller list of recent issues and also the most recentepic.CLI simplification and documentation updates:
bmo <cmd>, with the previousbmo issue <cmd>form retained for backward compatibility. Documentation indocs/commands.md,docs/agents.md, andREADME.mdhas been updated throughout to use the new direct forms and provide updated examples.bmo lsforbmo list) and updated flag names (e.g.,-kfor kind,-afor all, removal of redundant flags).agent-initoutput shortened (most recent 10 issues instead of 500) and some new commands suggested (file addandlink add).