Documentation
¶
Overview ¶
Package boardscope resolves the `--board NAME` / `--board-id N` flag pair against the local board cache and renders the result into JQL clauses and envelope data. FromFlags is the single place that decides which precedence path won (flag, default, or none); it is shared by issue list and jql build.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddFlags ¶
AddFlags wires the `--board NAME` / `--board-id N` flag pair (with mutual exclusion) onto a list-style command. Shared by `issue list` and `jql build` so the surface stays in lockstep.
func ApplyClauseToJQL ¶
func ApplyClauseToJQL(query string, scope jira.BoardScope) string
ApplyClauseToJQL inserts the board scope's JQL clause into query, preserving any top-level ORDER BY suffix so the result stays a valid query.
func EnvelopeData ¶
func EnvelopeData(scope jira.BoardScope) map[string]any
EnvelopeData renders a BoardScope into the envelope's data.board_scope map. The `applied` flag is sourced from JQLClause — the single owner of the "did this scope produce a clause?" decision — so any future emission rule flows through one predicate.
func FromFlags ¶
FromFlags reads the active command's `--board NAME` / `--board-id N` flag values, falls through to the active profile's `default_board` config (when defined), resolves the requested board against the cache, and returns the resulting (scope, precedence, err).
Precedence rules:
--board NAME explicit → flag wins, precedence "flag" --board-id N explicit → flag wins, precedence "flag" --board "" explicit → suppresses default, precedence "none" neither + default set → resolves default, precedence "default_board" neither + no default → no scope, precedence "none"
Types ¶
type ValidationError ¶
ValidationError is a typed error that asks the error mapper to classify the failure as a validation error (exit 3) — used for both default-board-missing and ambiguous-name disambiguation. Its BoardCandidates method lets the envelope writer surface disambiguation choices.
func (ValidationError) BoardCandidates ¶
func (e ValidationError) BoardCandidates() []map[string]any
func (ValidationError) Error ¶
func (e ValidationError) Error() string