Documentation
¶
Overview ¶
Package features holds the pure rules of grouping work into features (README.md): which feature a session's decision is attributed to, a feature's status, and when a pull request changed enough to be assigned again. Its subpackages hold the model calls. It reads no database.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LargeUpdate ¶
LargeUpdate reports whether a pull request's paths changed enough since its assignment to assign it again: the path change (1 - |A ∩ B| / |A ∪ B|) is at least minChange and at least minPaths paths differ. A host that selects pending items in its store applies the same rule.
func PathChange ¶
PathChange compares the paths a pull request was assigned with to those it touches now: how many paths are in one set only, and how many are in either.
Types ¶
type Attributor ¶
type Attributor struct {
// contains filtered or unexported fields
}
Attributor attributes one session's decisions to exactly one feature each; it is built once per session, not per decision.
func (Attributor) Attribute ¶
func (a Attributor) Attribute(files []string) string
Attribute is the one feature a decision citing files goes to, "" when the session belongs to none. With pull requests of several features, it goes to the pull request whose paths contain most of the cited files, matched by decisions.CitedPaths, since a cited file may be relative to the session's working directory (ties to the more dominant feature, then the earlier pull request); with no file in any of them, or one feature, to the dominant feature.
func (Attributor) PullRequest ¶
func (a Attributor) PullRequest(featureID string, files []string) string
PullRequest is the pull request of the feature a decision citing files is shown under: of the session's linked pull requests in that feature, the one whose paths contain most of the files, ties (and no match) to the earliest. "" when the session has none in it.
type LinkedPullRequest ¶
type LinkedPullRequest struct {
FeatureID, PullRequestID string
Number int32
OpenedAt time.Time
Commits, Paths []string
}
LinkedPullRequest is a feature's pull request holding commits linked (matched) to a session, and the paths it touches.
type SessionLinks ¶
type SessionLinks struct {
PullRequests []LinkedPullRequest
OwnFeature string
}
SessionLinks is what attributes a session's decisions: the feature pull requests linked to it and the feature it is in on its own.
func (SessionLinks) Attributor ¶
func (s SessionLinks) Attributor() Attributor
Attributor builds the session's Attributor.
func (SessionLinks) Features ¶
func (s SessionLinks) Features() []string
Features are the session's features, dominant first: by the session's linked commits in each feature's pull requests, most first, then by the earliest of those pull requests. A session with no feature pull request has the one it is in on its own, if any.
type Status ¶
type Status string
Status is derived from a feature's pull requests (README.md, "Status").
func DeriveStatus ¶
DeriveStatus is in progress while any pull request is open or there is none yet, shipped once one merged and none is open, and abandoned when all closed unmerged.
Directories
¶
| Path | Synopsis |
|---|---|
|
Package assign holds the feature assigner's model call (features/README.md, "Assigner"): the input it renders for one pull request or session and its candidate features, the reply schema, and the validation of a reply; and the batch path, which assigns several pull requests in one call under the same rules (batch.go).
|
Package assign holds the feature assigner's model call (features/README.md, "Assigner"): the input it renders for one pull request or session and its candidate features, the reply schema, and the validation of a reply; and the batch path, which assigns several pull requests in one call under the same rules (batch.go). |
|
Package consolidate holds the feature consolidation's model calls (features/README.md, "Consolidation"): the input rendered for a repository's merge call and for one feature's split call, the reply schemas, and the validation of a reply.
|
Package consolidate holds the feature consolidation's model calls (features/README.md, "Consolidation"): the input rendered for a repository's merge call and for one feature's split call, the reply schemas, and the validation of a reply. |
|
Package discover holds feature discovery's pure parts (features/README.md, "Discovery"): the taxonomy a discovery task replies with and its bounds, the pull request history digest the task reads, the task's prompt and reply schema, and the path score a seeded feature is offered by.
|
Package discover holds feature discovery's pure parts (features/README.md, "Discovery"): the taxonomy a discovery task replies with and its bounds, the pull request history digest the task reads, the task's prompt and reply schema, and the path score a seeded feature is offered by. |
|
Package summary holds the feature summarizer's model calls (features/README.md, "Summarizer"): the input rendered for one feature and for one pull request, the reply schemas, and the validation of a reply.
|
Package summary holds the feature summarizer's model calls (features/README.md, "Summarizer"): the input rendered for one feature and for one pull request, the reply schemas, and the validation of a reply. |