Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Migrator ¶
type Migrator struct { Mode // contains filtered or unexported fields }
Migrator will search github for PRs with a given context and migrate/retire/move them.
type Mode ¶
type Mode struct {
// contains filtered or unexported fields
}
Mode is a struct that describes the behavior of a status migration. The behavior is described as a list of conditions and a function that determines the actions to be taken when the conditions are met.
func CopyMode ¶
CopyMode makes a mode that creates a new context in every PR that has the old context, but not the new one. The state, description and target URL of the new context are made the same as those of the old context.
func MoveMode ¶
MoveMode creates a mode that both copies and retires. The mode creates a new context on every PR with the old context but not the new one, setting the state of the new context to that of the old context before retiring the old context. A target URL to describe why the old context was migrated can optionally be provided, as well.
func RetireMode ¶
RetireMode creates a mode that retires an old context on all PRs. If newContext is the empty string, origContext is retired without replacement. Its state is set to 'success' and its description is set to indicate that the context is retired. If newContext is not the empty string it is considered the replacement of origContext. This means that only PRs that have the newContext in addition to the origContext will be considered and the description of the retired context will indicate that it was replaced by newContext. A target URL to describe why the old context was migrated can optionally be provided, as well.