Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrIssueNotFound = errors.New("tracker: issue not found")
ErrIssueNotFound is returned by IsIssueClosed when the tracker has no record of the requested issueID (HTTP 404 or equivalent). Callers can branch on it via errors.Is to distinguish "tracker says open" from "tracker doesn't know".
Functions ¶
Types ¶
type Issue ¶
type Issue struct {
TrackerType string
ID string
Subject string
Description string
Status string
Project string
}
Issue is the tracker-agnostic wire shape of a work item: every field is a string exactly as a tracker backend reports it. It is the external/source representation, the first of three "Issue" shapes — it is embedded into the in-flow domain entity issue.Issue, which is in turn persisted as store.Issue. See the doc on issue.Issue for the full picture.
type Tracker ¶
type Tracker interface {
// ListIssues retrieves the issues from the tracker
ListIssues(ctx context.Context) ([]Issue, error)
// ListStatuses returns the available status names for the tracker.
ListStatuses(ctx context.Context) ([]string, error)
// UpdateIssueStatus updates the status from the given issueID
UpdateIssueStatus(ctx context.Context, issueID, statusName string) error
// IsIssueClosed reports whether the tracker considers issueID closed.
// Returns ErrIssueNotFound for missing-issue cases so callers can format
// the warning distinctly from transport/auth failures.
IsIssueClosed(ctx context.Context, issueID string) (bool, error)
}
Tracker is the contract every adapter must satisfy.
Click to show internal directories.
Click to hide internal directories.