Documentation
¶
Overview ¶
Package gitctx derives Linear context from the current VCS checkout.
Index ¶
- Variables
- func CurrentIssueIdentifier(ctx context.Context, dir string) (string, error)
- func CurrentIssueIdentifierForTeam(ctx context.Context, dir string, teamKey string) (string, error)
- func ParseIssueIdentifier(text string) (string, bool)
- func ParseIssueIdentifierForTeam(text string, teamKey string) (string, bool)
Constants ¶
This section is empty.
Variables ¶
var ErrIssueReferenceMissing = errors.New("linear issue reference missing")
ErrIssueReferenceMissing marks a checkout without a Linear issue reference.
Functions ¶
func CurrentIssueIdentifier ¶
CurrentIssueIdentifier derives the active Linear issue from git or jj checkout context, without restricting to a specific team key.
func CurrentIssueIdentifierForTeam ¶ added in v0.7.0
CurrentIssueIdentifierForTeam derives the active Linear issue from git or jj checkout context, restricted to the given team key. An empty team key keeps the unfiltered behavior, so callers without a Pinned Target are unaffected.
func ParseIssueIdentifier ¶
ParseIssueIdentifier extracts the first Linear issue identifier from text. An explicit uppercase identifier anywhere in the text always wins; failing that, the first case-insensitive match is normalized to uppercase. This tolerates Linear's own generated branch names (the `branchName` field and the "copy branch name" UI action), which are lowercase.
func ParseIssueIdentifierForTeam ¶ added in v0.7.0
ParseIssueIdentifierForTeam extracts the first Linear issue identifier from text, restricted to the given team key. An empty team key keeps the unfiltered behavior of ParseIssueIdentifier, so reads without a Pinned Target are unaffected. A non-empty team key rejects any match whose team-key portion does not equal teamKey, bounding the false-positive risk that case-insensitive matching introduces (e.g. "fix-123", "bug-42").
Types ¶
This section is empty.