hive-forge: add dependency verb for issue/pr blocking relationships
This commit is contained in:
parent
32643dae36
commit
6a95aceedb
6 changed files with 121 additions and 11 deletions
|
|
@ -1,10 +1,11 @@
|
|||
//! `pr <verb>` — PR-scoped sub-commands. Wraps the per-verb modules under a
|
||||
//! `pr` parent so `hive-forge pr close 42`, `pr status --pr 42`, etc. read as
|
||||
//! kind-namespaced commands. The generic verbs that also work on issues
|
||||
//! (view/comment/comments/close/reopen/edit/labels/assign-committer/timeline)
|
||||
//! kind-check the number is a PR first (`assert_kind`); the PR-only verbs
|
||||
//! hit `/pulls/…` and are kind-correct by construction. The flat `pr-*` +
|
||||
//! bare generic verbs stay as hidden back-compat aliases (see `main.rs`).
|
||||
//! (view/comment/comments/close/reopen/edit/labels/assign-committer/
|
||||
//! dependency/timeline) kind-check the number is a PR first (`assert_kind`);
|
||||
//! the PR-only verbs hit `/pulls/…` and are kind-correct by construction.
|
||||
//! The flat `pr-*` + bare generic verbs stay as hidden back-compat aliases
|
||||
//! (see `main.rs`).
|
||||
|
||||
use anyhow::Result;
|
||||
use clap::{Args as ClapArgs, Subcommand};
|
||||
|
|
@ -54,6 +55,8 @@ enum Cmd {
|
|||
/// Assign or unassign a user (the PR's assignee list).
|
||||
#[command(alias = "assign")]
|
||||
AssignCommitter(verbs::assign::Args),
|
||||
/// List / add / remove dependencies (issues/PRs this one is blocked by).
|
||||
Dependency(verbs::dependency::Args),
|
||||
/// List timeline events.
|
||||
Timeline(verbs::timeline::Args),
|
||||
}
|
||||
|
|
@ -102,6 +105,10 @@ pub fn run(client: &Client, args: Args) -> Result<()> {
|
|||
assert_kind(client, a.number, Kind::Pr)?;
|
||||
verbs::assign::run(client, a)
|
||||
}
|
||||
Cmd::Dependency(a) => {
|
||||
assert_kind(client, a.number, Kind::Pr)?;
|
||||
verbs::dependency::run(client, a)
|
||||
}
|
||||
Cmd::Timeline(a) => {
|
||||
assert_kind(client, a.number, Kind::Pr)?;
|
||||
verbs::timeline::run(client, a)
|
||||
|
|
|
|||
Loading…
Reference in a new issue