Commit graph

2 commits

Author SHA1 Message Date
Vishnu J
67b066b58e
fix(create): say --file is one issue per ## heading (#5921)
bd create --file/-f is a batch-import route: it creates one issue per
H2 ("##") heading, and ### subsections attach fields to that issue.
The old Usage was "Create multiple issues from markdown file", which
never named those semantics or --body-file. Callers who wanted "one
issue, description loaded from a file" reached for the shortest flag
and got a silent bulk import instead -- reported by @seanmartinsmith
with a 3-section briefing file (## Problem / ## Context / ##
Acceptance Criteria) that became 3 issues instead of one.

gatherCreateInput already rejects a positional title combined with
--file. That is the reporter's literal repro, so this keeps the
rejection and adds a --body-file hint on the error they actually
see. The remaining trap -- --file used alone on a section-headed
file -- is unchanged, because bd cannot tell that apart from a
genuine batch file by content.

Tests: parseMarkdownFile reproduces the trap file; gatherCreateInput
locks in the title+--file rejection and --body-file hint; flag Usage
names the per-heading behavior. The existing TestCreateFromMarkdownFile
binary path already covers well-formed --file creates.
2026-09-02 18:11:56 -07:00
davevan2
3e6f259608
fix(create): reject caller input that would be discarded (#4984)
* Reject create input that would be silently discarded

* fix(create): reject --allow-empty-description on direct-mode --file/--graph dispatch

Direct-mode (non-proxied) --file and --graph dispatch in cmd/bd/create.go
returned before the validateDescriptionUpdate/--allow-empty-description
check, so the flag was silently accepted-and-ignored in direct mode while
correctly rejected in proxied mode (create_input.go's
rejectSingleIssueFlagsForMarkdown/ForGraph). This closes the direct-mode
gap flagged in the 2026-07-23 CHANGES_REQUESTED review on
gastownhall/beads#4984, adding matching guards before
createIssuesFromMarkdown/createIssuesFromGraph, plus regression tests for
both rejections and a successful single-issue --allow-empty-description
round trip.

Agent-Signature: claude-sonnet-5-medium on behalf of maphew

---------

Co-authored-by: matt wilkie <maphew@gmail.com>
2026-07-28 11:52:52 -07:00