rename pr verbs per review: request-review -> assign-reviewer, assign -> assign-committer
This commit is contained in:
parent
a97d159009
commit
224cb06004
5 changed files with 19 additions and 17 deletions
|
|
@ -1,7 +1,7 @@
|
|||
//! `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/labels/assign/timeline) kind-check the number
|
||||
//! (view/comment/comments/close/reopen/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`).
|
||||
|
|
@ -32,8 +32,8 @@ enum Cmd {
|
|||
Merge(verbs::pr_merge::Args),
|
||||
/// List a PR's reviews, or submit one.
|
||||
Reviews(verbs::pr_reviews::Args),
|
||||
/// Request (or withdraw) a review from a user.
|
||||
RequestReview(verbs::pr_request_review::Args),
|
||||
/// Request (or withdraw with `--remove`) a review from a user.
|
||||
AssignReviewer(verbs::pr_assign_reviewer::Args),
|
||||
/// Print the PR's unified diff.
|
||||
Diff(verbs::diff::Args),
|
||||
/// Show title + body + comments.
|
||||
|
|
@ -48,8 +48,9 @@ enum Cmd {
|
|||
Reopen(verbs::reopen::Args),
|
||||
/// List / add / remove labels.
|
||||
Labels(verbs::labels::Args),
|
||||
/// Assign or unassign a user.
|
||||
Assign(verbs::assign::Args),
|
||||
/// Assign or unassign a user (the PR's assignee list).
|
||||
#[command(alias = "assign")]
|
||||
AssignCommitter(verbs::assign::Args),
|
||||
/// List timeline events.
|
||||
Timeline(verbs::timeline::Args),
|
||||
}
|
||||
|
|
@ -63,7 +64,7 @@ pub fn run(client: &Client, args: Args) -> Result<()> {
|
|||
Cmd::Status(a) => verbs::pr_status::run(client, a),
|
||||
Cmd::Merge(a) => verbs::pr_merge::run(client, a),
|
||||
Cmd::Reviews(a) => verbs::pr_reviews::run(client, a),
|
||||
Cmd::RequestReview(a) => verbs::pr_request_review::run(client, a),
|
||||
Cmd::AssignReviewer(a) => verbs::pr_assign_reviewer::run(client, a),
|
||||
Cmd::Diff(a) => verbs::diff::run(client, a),
|
||||
// Generics shared with `issue` — verify the number is a PR first.
|
||||
Cmd::View(a) => {
|
||||
|
|
@ -90,7 +91,7 @@ pub fn run(client: &Client, args: Args) -> Result<()> {
|
|||
assert_kind(client, a.number, Kind::Pr)?;
|
||||
verbs::labels::run(client, a)
|
||||
}
|
||||
Cmd::Assign(a) => {
|
||||
Cmd::AssignCommitter(a) => {
|
||||
assert_kind(client, a.number, Kind::Pr)?;
|
||||
verbs::assign::run(client, a)
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue