diff --git a/hive-forge/src/verbs/issue_create.rs b/hive-forge/src/verbs/issue_create.rs index f162714d..5b279455 100644 --- a/hive-forge/src/verbs/issue_create.rs +++ b/hive-forge/src/verbs/issue_create.rs @@ -34,12 +34,20 @@ pub struct Args { /// # Errors /// /// Propagates any I/O error from the body input (`--body-file`, -/// stdin), any transport error from the Forgejo REST call (network -/// unreachable, 4xx/5xx response, token missing/invalid, the -/// `--label` lookup's own list-labels call), an unresolved `--label` -/// name, and any I/O error from writing the issue URL to stdout. +/// stdin), an absent or whitespace-only body (an issue's body *is* +/// the issue per this repo's contribution guidance — an empty one is +/// never intentional, only ever the signature of a mistake upstream, +/// e.g. a heredoc that bound to the wrong command in a pipeline), any +/// transport error from the Forgejo REST call (network unreachable, +/// 4xx/5xx response, token missing/invalid, the `--label` lookup's +/// own list-labels call), an unresolved `--label` name, and any I/O +/// error from writing the issue URL to stdout. pub fn run(client: &Client, args: Args) -> Result<()> { - let body = body::resolve(args.body.as_deref(), args.body_file.as_deref())?.unwrap_or_default(); + let body = body::resolve_required( + args.body.as_deref(), + args.body_file.as_deref(), + "issue-create", + )?; let (owner, name) = client.owner_repo()?; let label_ids = if args.labels.is_empty() { None