Documentation
¶
Overview ¶
Package patterns reads back the markers written on pull requests: the unhandled-failure markers the sweep writes, grouped by signature, and the rescue markers a rescue writes, counted per week.
A sweep run groups the failures no rule recognised in memory and prints the groups; the run then ends and the grouping ends with it. The markers stay on the pull requests, so they are what a later command reads: the skeleton `marge rules draft` builds, and the count that says whether a pattern is seen often enough to be worth a rule.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Group ¶
type Group struct {
Signature string
Checks []string
// Excerpt is the log the first marker of the group recorded. Every
// marker of one signature describes the same failure, so one excerpt
// is enough to build a rule against.
Excerpt string
Count int
PRs []string
// LastSeen is the newest marker of the group.
LastSeen time.Time
}
Group is one shape of failure, with the pull requests that carry it.
type Search ¶
type Search struct {
Client *github.Client
Org string
// Since bounds the search to pull requests updated on or after it, and
// drops markers written before it. A zero time reads the whole history
// the search returns.
Since time.Time
}
Search finds the markers over one organization.
func (Search) Rescues ¶ added in v0.47.0
Rescues counts the rescue attempts recorded on the pull requests of repos on or after Since: every rescue marker, whatever its outcome, on an open, merged or closed pull request. Sweep evidence does not count. repos holds owner/name entries; a pull request outside them is another team's.