Documentation
¶
Overview ¶
Package issuekey parses and expands issue-key expressions into canonical Jira keys. It accepts single keys (PROJ-1), comma lists, and inclusive ranges written with ":" or ".." (PROJ-1..PROJ-5 or PROJ-1..5).
A local expansion cap bounds the blow-up: a range is expanded client-side, so an unbounded PROJ-1..PROJ-9999999 would otherwise materialize millions of keys before any Jira call. The cap is enforced here, before the network, and a hit is reported as a typed ExpansionLimitError.
Index ¶
Constants ¶
const DefaultMaxExpansion = 1000
DefaultMaxExpansion caps how many keys one ParseExpressions call may yield when Options.MaxExpansion is unset, bounding range expansion.
Variables ¶
This section is empty.
Functions ¶
func IsExpression ¶ added in v0.3.0
IsExpression reports whether s begins like an issue-key expression (a single key, a range, or a comma list) rather than free text such as a status name. It only checks the leading token against the key pattern — it does not validate a range end or list members — so it stays cheap and never expands a range. ParseExpressions still fully validates the keys afterwards. Callers use it to tell an issue key from a status name in mixed argument lists like `transition KEY "In Progress"`.
func ParseExpressions ¶
ParseExpressions expands issue-key expressions into canonical Jira keys. Supported forms are single keys, comma lists, and inclusive ranges using ":" or ".." with either a numeric end or a full issue key end.
Types ¶
type ExpansionLimitError ¶ added in v0.2.0
type ExpansionLimitError struct {
Max int
}
ExpansionLimitError reports a locally-enforced issue-key expansion limit.
func (*ExpansionLimitError) Code ¶ added in v0.9.0
func (e *ExpansionLimitError) Code() errtax.Code
Code classifies the failure under issue_key_expansion_limit.
func (*ExpansionLimitError) Error ¶ added in v0.2.0
func (e *ExpansionLimitError) Error() string