mirror of
https://github.com/gastownhall/beads.git
synced 2026-09-14 20:17:24 +08:00
d2f87d50de
* docs(pipeline): pin the generated CLI docs to the released bd; repair main's CLI reference The #4874 squash-merge raced the docs-autofix bot: the bot had pushed a regeneration from main's source onto the PR branch, so the squash landed a contradictory mix — the release-aligned hand-written docs plus a CLI reference re-documenting unreleased commands and flags, with docs.json referencing four pages (heartbeat, migrate-personal, reclaim, unclaim) whose files do not exist. That broken nav fails the docsync guard on main and on every branch cut from it. This restores the intended end state of #4874 and lands the pin that prevents the race from recurring. - Regenerate the CLI reference from a bd built from the v1.1.0 tag (CI's canonical pure-Go build), removing the unreleased commands/flags and fixing the dangling nav entries. - docs/cli-docs.pin names the release tag; scripts/resolve-docs-bd.sh builds and caches a canonical pure-Go bd from that tag, fetching the tag first in shallow CI checkouts. - generate-cli-docs.sh, check-doc-flags.sh, and check-cli-docs-drift.sh resolve bd through the pin and ignore a supplied binary while pinned (BD_DOCS_IGNORE_PIN=1 bypasses), so the drift gates and the autofix bot now enforce docs-match-release instead of docs-match-main. - tools/docsmint detects the pre-overhaul Docusaurus staging layout that bd <= v1.1.0 emits and converts it to the generic form before its normal Mintlify transform (tested); removable once the pin reaches a release whose emitter writes build/cli-docs. - check-doc-flags.sh: run without timeout(1) on macOS instead of failing Check 4. - Decision record: engdocs/decisions/2026-07-17-docs-release-pin.md; the beads-docs skill §8 updated to match. * lint: annotate gosec G705 false positive in the docsmint legacy bridge Same class as the existing nav-splice annotation: a developer tool writing repo Markdown, not a web-output sink.
85 lines
3.9 KiB
Markdown
85 lines
3.9 KiB
Markdown
---
|
|
title: "bd import"
|
|
description: "Import issues from a JSONL file (newline-delimited JSON) into the database."
|
|
---
|
|
|
|
{/* AUTO-GENERATED: do not edit manually */}
|
|
|
|
Generated from `bd help --doc import`.
|
|
|
|
Import issues from a JSONL file (newline-delimited JSON) into the database.
|
|
|
|
If no file is specified, imports from the configured import.path under .beads/
|
|
(default: issues.jsonl). Use "-" to read from stdin. This is the incremental counterpart to
|
|
'bd export': new issues are created and existing issues are updated (upsert
|
|
semantics).
|
|
|
|
Memory records (lines with "_type":"memory") are automatically detected and
|
|
imported as persistent memories (equivalent to 'bd remember'). This makes
|
|
'bd export | bd import' a full round-trip for both issues and memories.
|
|
|
|
Each JSONL line should map to an issue. The importer accepts every field
|
|
'bd export' emits — see 'bd export' output for the canonical schema. Only
|
|
"title" is required; everything else is optional.
|
|
|
|
Common fields:
|
|
title Required. Short summary.
|
|
description Long-form body.
|
|
design, notes, Additional content sections.
|
|
acceptance_criteria
|
|
issue_type bug | feature | task | epic | chore | ...
|
|
priority 0-4 (0 = critical). 0 is preserved (no omitempty).
|
|
status open | in_progress | blocked | closed | ...
|
|
(rows with status "tombstone" are skipped)
|
|
assignee, owner, Ownership metadata.
|
|
created_by
|
|
labels Array of strings.
|
|
dependencies Array of {issue_id, depends_on_id, type, ...}.
|
|
comments Array of comment objects.
|
|
external_ref, Cross-system identifiers (e.g. "gh-9").
|
|
source_system
|
|
due_at, defer_until RFC3339 timestamps for scheduling.
|
|
metadata Arbitrary JSON object preserved verbatim.
|
|
|
|
Timestamps (created_at, updated_at, started_at, closed_at) are preserved
|
|
when present in the JSONL and otherwise filled in by the importer. The
|
|
legacy "wisp" boolean is accepted as an alias for "ephemeral".
|
|
|
|
By default a row only rewrites an existing local issue when its
|
|
updated_at is strictly newer. Older rows are skipped (reported as
|
|
stale_skipped_ids) and rows with the same updated_at keep every local
|
|
column — updated_at has second granularity, so a timestamp tie can be
|
|
two distinct same-second updates, and the local row wins the tie
|
|
(reported as tie_kept_local_ids; the row's labels/comments/dependencies
|
|
still merge). The guard is also enforced inside the upsert itself, so a
|
|
local update that lands while the import is running is preserved rather
|
|
than overwritten. Existing issues that the import did rewrite are listed
|
|
with a field-level summary (updated_issues), so local state changed by
|
|
an import is visible. To deliberately restore an older snapshot, pass
|
|
--allow-stale, which imports every row even when it overwrites newer
|
|
local state.
|
|
|
|
EXAMPLES:
|
|
bd import # Import from configured import.path
|
|
bd import backup.jsonl # Import from a specific file
|
|
bd import -i backup.jsonl # Legacy alias for a specific file
|
|
bd import - # Read JSONL from stdin
|
|
cat issues.jsonl | bd import - # Pipe JSONL from another tool
|
|
bd import --dry-run # Show what would be imported
|
|
bd import --dedup # Skip issues with duplicate titles
|
|
bd import --allow-stale old.jsonl # Restore an older snapshot (overwrites newer local rows)
|
|
bd import --json # Structured output with created and skipped IDs
|
|
|
|
```
|
|
bd import [file|-] [flags]
|
|
```
|
|
|
|
**Flags:**
|
|
|
|
```
|
|
--allow-stale Import rows even when older than the local issue (required to restore an older snapshot)
|
|
--dedup Skip lines whose title matches an existing open issue
|
|
--dry-run Show what would be imported without importing
|
|
-i, --input string Read JSONL from a specific file
|
|
```
|