From 0824caaa2b7513cedd4167406ad46e343daee8f9 Mon Sep 17 00:00:00 2001 From: atlas Date: Wed, 2 Sep 2026 18:18:24 +0200 Subject: [PATCH] hive-forge: two more pure renames say what replaced them Second round for the flat-alias deprecation. `pr-commits` and `pr-assign-reviewer` are back-compat aliases with an exact scoped equivalent, and they were missed by all three buckets of the original accounting -- which was wrong in both terms: `reopen`/`dependency`/ `reaction` appear only in the doc-comment prose listing the scoped surface and are not Verb variants at all, so the real count is 17 (7 + 2 + 7 + 1), not 18. The test for "pure rename" is that an exact scoped form exists AND the verb is PR-only, so a caller holding just a number can be sent somewhere unambiguous. Verified rather than assumed: `pr commits` and `pr assign-reviewer` exit 0, while `issue commits` and `issue assign-reviewer` exit 2 -- the same code a deliberately bogus verb returns, which is what makes those 2s mean "no such verb". That is also why the seven kind-agnostic aliases are untouched here: each exists as both `issue ` and `pr `, so refusing them would remove a capability rather than rename one. Both run functions are still called from pr_cmd.rs, so nothing becomes dead code. The enum's block comment enumerates the pure renames by name and is extended to match -- left alone it would be a stale claim naming seven of nine. --- hive-forge/src/main.rs | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/hive-forge/src/main.rs b/hive-forge/src/main.rs index 91fb8103..7f59afa5 100644 --- a/hive-forge/src/main.rs +++ b/hive-forge/src/main.rs @@ -64,9 +64,12 @@ enum Verb { // `issue ` forms, and they are at two different stages: // // - **Pure renames** (`pr-status`, `pr-create`, `pr-merge`, - // `pr-reviews`, `issue-create`, `issue-edit`, `diff`) now *refuse* - // and name their replacement — see `renamed`. They are removed - // outright in a later release. + // `pr-reviews`, `pr-commits`, `pr-assign-reviewer`, `issue-create`, + // `issue-edit`, `diff`) now *refuse* and name their replacement — + // see `renamed`. They are removed outright in a later release. + // The test is PR-only-ness: each has an exact scoped equivalent and + // no `issue ` form, so a caller holding just a number can be + // sent somewhere unambiguous. // - **Kind-agnostic** (`view`, `comment`, `comments`, `close`, // `assign`, `labels`, `timeline`, …) still work. Each exists as both // `issue ` and `pr `, so there is no single replacement @@ -311,7 +314,7 @@ fn dispatch(client: &client::Client, verb: Verb) -> Result<()> { Verb::IssueCreate(_) => renamed("issue-create", "issue create"), Verb::IssueEdit(_) => renamed("issue-edit", "issue edit"), Verb::Pr(a) => verbs::pr_cmd::run(client, a), - Verb::PrCommits(a) => verbs::pr_commits::run(client, a), + Verb::PrCommits(_) => renamed("pr-commits", "pr commits"), Verb::PrCreate(_) => renamed("pr-create", "pr create"), Verb::Comment(a) => verbs::comment::run(client, a), Verb::Comments(a) => verbs::comments::run(client, a), @@ -331,7 +334,7 @@ fn dispatch(client: &client::Client, verb: Verb) -> Result<()> { Verb::Milestone(a) => verbs::milestone::run(client, a), Verb::PrMerge(_) => renamed("pr-merge", "pr merge"), Verb::PrReviews(_) => renamed("pr-reviews", "pr reviews"), - Verb::PrAssignReviewer(a) => verbs::pr_assign_reviewer::run(client, a), + Verb::PrAssignReviewer(_) => renamed("pr-assign-reviewer", "pr assign-reviewer"), Verb::Branches(a) => verbs::branches::run(client, a), Verb::TreeSha(a) => verbs::tree_sha::run(client, a), Verb::Diff(_) => renamed("diff", "pr diff"),