docs(#2671): trim per-verb arg help (diff, list, lint, pr-merge)

Continue trimming clap arg help to user-relevant info: drop the
token-bounded-paging rationale (list --page), the why-it's-required
note (lint no-reviewer), the `Forgejo Do:`/`force_merge` API internals
(pr-merge), and tighten diff --full. pr-status was already clean.
This commit is contained in:
atlas 2026-07-23 22:50:55 +02:00
commit 311599e8f2
4 changed files with 11 additions and 20 deletions

View file

@ -23,10 +23,9 @@ use crate::client::{Client, index};
pub struct Args { pub struct Args {
/// PR number. /// PR number.
number: u64, number: u64,
/// Print the unfiltered diff including autogenerated-file /// Print the unfiltered diff. By default, autogenerated-file hunks
/// hunks (`flake.lock`, `Cargo.lock`, etc.). Default is to /// (`flake.lock`, `Cargo.lock`, …) are collapsed to a placeholder so
/// collapse those hunks to a placeholder so the human-authored /// human-authored changes stay readable.
/// changes aren't drowned in lock churn.
#[arg(long)] #[arg(long)]
full: bool, full: bool,
} }

View file

@ -109,10 +109,8 @@ struct NoReviewerArgs {
/// Filter by PR state. /// Filter by PR state.
#[arg(long, value_enum, default_value_t = State::Open)] #[arg(long, value_enum, default_value_t = State::Open)]
state: State, state: State,
/// Reviewer login to look for (matches `@<reviewer>` in PR body or /// Reviewer login to look for (matches `@<reviewer>` in the PR body
/// any comment). Required — defaulting to a specific name would /// or any comment).
/// bake one deployment's reviewer convention into the binary
/// (flagged in review).
#[arg(long)] #[arg(long)]
reviewer: String, reviewer: String,
} }

View file

@ -89,12 +89,8 @@ pub struct Args {
/// ~50, applies). Must be >= 1. /// ~50, applies). Must be >= 1.
#[arg(long, default_value_t = 30, value_parser = clap::value_parser!(u64).range(1..))] #[arg(long, default_value_t = 30, value_parser = clap::value_parser!(u64).range(1..))]
limit: u64, limit: u64,
/// Page number to fetch (1-based; default 1). Combine with `--limit` /// Page number to fetch (1-based, default 1). Combine with `--limit`
/// to walk a large result set incrementally — fetch page 1, process, /// to page through large result sets incrementally.
/// fetch page 2, … until a short/empty page. This keeps each call
/// token-bounded (one page at a time) instead of pulling a whole
/// repo's population into a single response. Must be >= 1 (the forge
/// pages are 1-based; page 0 is rejected).
#[arg(long, default_value_t = 1, value_parser = clap::value_parser!(u64).range(1..))] #[arg(long, default_value_t = 1, value_parser = clap::value_parser!(u64).range(1..))]
page: u64, page: u64,
} }

View file

@ -24,9 +24,9 @@ use crate::client::{Client, index, split_repo};
/// per-commit history, so a squash option isn't exposed). /// per-commit history, so a squash option isn't exposed).
#[derive(Clone, Copy, ValueEnum)] #[derive(Clone, Copy, ValueEnum)]
pub enum Method { pub enum Method {
/// Create a merge commit (Forgejo `Do: merge`). /// Create a merge commit.
Merge, Merge,
/// Rebase the head branch onto the base then fast-forward (Forgejo `Do: rebase`). /// Rebase the head branch onto the base, then fast-forward.
Rebase, Rebase,
} }
@ -56,13 +56,11 @@ pub struct Args {
/// Merge strategy (default: a merge commit). Squash is not offered. /// Merge strategy (default: a merge commit). Squash is not offered.
#[arg(long, value_enum, default_value = "merge")] #[arg(long, value_enum, default_value = "merge")]
method: Method, method: Method,
/// Keep the head branch after merging. By default the head branch is /// Keep the head branch after merging (deleted by default).
/// deleted once the merge succeeds.
#[arg(long = "keep-branch")] #[arg(long = "keep-branch")]
keep_branch: bool, keep_branch: bool,
/// Merge even if the PR is not mergeable, CI is not green, or a review /// Merge even if the PR is not mergeable, CI is not green, or a review
/// requests changes. Also sets Forgejo's `force_merge` so the server does /// requests changes.
/// not refuse on its own status checks.
#[arg(long)] #[arg(long)]
force: bool, force: bool,
} }