beads

package
v0.19.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 2, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

Package beads provides import functionality for beads issue tracker.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FindBeadsFile

func FindBeadsFile(root string) string

FindBeadsFile looks for the beads JSONL file in the given directory.

Types

type Dependency

type Dependency struct {
	IssueID     string `json:"issue_id"`
	DependsOnID string `json:"depends_on_id"`
	Type        string `json:"type"`
}

Dependency represents a relationship between issues.

type ImportResult

type ImportResult struct {
	Imported int
	Skipped  int
	IDMap    map[string]string // beads ID -> tick ID
}

ImportResult contains the results of an import operation.

func Import

func Import(issues []Issue, store *tick.Store, owner string) (*ImportResult, error)

Import converts beads issues to ticks and writes them to the store.

type Issue

type Issue struct {
	ID                 string       `json:"id"`
	Title              string       `json:"title"`
	Description        string       `json:"description,omitempty"`
	Notes              string       `json:"notes,omitempty"`
	Status             string       `json:"status"`
	Priority           int          `json:"priority"`
	IssueType          string       `json:"issue_type"`
	Assignee           string       `json:"assignee,omitempty"`
	Labels             []string     `json:"labels,omitempty"`
	Dependencies       []Dependency `json:"dependencies,omitempty"`
	AcceptanceCriteria string       `json:"acceptance_criteria,omitempty"`
	Design             string       `json:"design,omitempty"`
	ExternalRef        string       `json:"external_ref,omitempty"`
	DeferUntil         *time.Time   `json:"defer_until,omitempty"`
	DueAt              *time.Time   `json:"due_at,omitempty"`
	CreatedAt          time.Time    `json:"created_at"`
	CreatedBy          string       `json:"created_by,omitempty"`
	UpdatedAt          time.Time    `json:"updated_at"`
	ClosedAt           *time.Time   `json:"closed_at,omitempty"`
	CloseReason        string       `json:"close_reason,omitempty"`
	DeletedAt          *time.Time   `json:"deleted_at,omitempty"`
}

Issue represents a beads issue from JSONL export.

func FilterImportable

func FilterImportable(issues []Issue) []Issue

FilterImportable returns issues that should be imported (not closed, not deleted).

func Parse

func Parse(r io.Reader) ([]Issue, error)

Parse reads beads issues from a JSONL reader.

func ParseFile

func ParseFile(path string) ([]Issue, error)

ParseFile reads a beads JSONL file and returns all issues.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL