fix: priority:0 omitempty and markdown nil pointer (GH#671, GH#674)

- Remove omitempty from Priority field so P0 issues preserve priority:0
- Add nil check for store in createIssuesFromMarkdown

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Steve Yegge
2025-12-21 15:41:22 -08:00
parent 4e8924c52f
commit 8b87c556c7
3 changed files with 11 additions and 2 deletions

View File

@@ -306,6 +306,15 @@ func parseMarkdownFile(path string) ([]*IssueTemplate, error) {
// createIssuesFromMarkdown parses a markdown file and creates multiple issues from it
func createIssuesFromMarkdown(_ *cobra.Command, filepath string) {
// Ensure globals are initialized (bd-m0tl: fix nil pointer when store not ready)
if store == nil {
fmt.Fprintf(os.Stderr, "Error: database not initialized\n")
os.Exit(1)
}
if actor == "" {
actor = "bd" // Default actor if not set
}
// Parse markdown file
templates, err := parseMarkdownFile(filepath)
if err != nil {