Extends all data commands to support merge requests alongside issues, with consistent patterns and JSON output for robot mode. List command (gi list mrs): - MR-specific columns: branches, draft status, reviewers - Filters: --state (opened|merged|closed|locked|all), --draft, --no-draft, --reviewer, --target-branch, --source-branch - Discussion count with unresolved indicator (e.g., "5/2!") - JSON output includes full MR metadata Show command (gi show mr <iid>): - MR details with branches, assignees, reviewers, merge status - DiffNote positions showing file:line for code review comments - Full description and discussion bodies (no truncation in JSON) - --json flag for structured output with ISO timestamps Count command (gi count mrs): - MR counting with optional --type filter for discussions/notes - JSON output with breakdown by state Ingest command (gi ingest --type mrs): - Full MR sync with discussion prefetch - Progress output shows MR-specific metrics (diffnotes count) - JSON summary with comprehensive sync statistics All commands respect global --robot mode for auto-JSON output. The pattern "gi list mrs --json | jq '.mrs[] | .iid'" now works for scripted MR processing. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
26 lines
875 B
Rust
26 lines
875 B
Rust
//! CLI command implementations.
|
|
|
|
pub mod auth_test;
|
|
pub mod count;
|
|
pub mod doctor;
|
|
pub mod ingest;
|
|
pub mod init;
|
|
pub mod list;
|
|
pub mod show;
|
|
pub mod sync_status;
|
|
|
|
pub use auth_test::run_auth_test;
|
|
pub use count::{print_count, print_count_json, run_count};
|
|
pub use doctor::{print_doctor_results, run_doctor};
|
|
pub use ingest::{print_ingest_summary, print_ingest_summary_json, run_ingest};
|
|
pub use init::{InitInputs, InitOptions, InitResult, run_init};
|
|
pub use list::{
|
|
ListFilters, MrListFilters, open_issue_in_browser, open_mr_in_browser, print_list_issues,
|
|
print_list_issues_json, print_list_mrs, print_list_mrs_json, run_list_issues, run_list_mrs,
|
|
};
|
|
pub use show::{
|
|
print_show_issue, print_show_issue_json, print_show_mr, print_show_mr_json, run_show_issue,
|
|
run_show_mr,
|
|
};
|
|
pub use sync_status::{print_sync_status, print_sync_status_json, run_sync_status};
|