retester

package
v0.0.0-...-e0e1170 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 30, 2024 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Retester Retester `json:"retester"`
}

Config is retester configuration for all configured repos and orgs. It has three levels: global, org, and repo. A specific level overrides general ones.

func LoadConfig

func LoadConfig(configFilePath string) (*Config, error)

LoadConfig loads retester configuration via file.

func (*Config) GetRetesterPolicy

func (c *Config) GetRetesterPolicy(org, repo string) (RetesterPolicy, error)

type Oranization

type Oranization struct {
	RetesterPolicy `json:",inline"`
	Repos          map[string]Repo `json:"repos"`
}

Oranization is org level configuration for retester configuration. Policy is overridden by repo level when it is enabled.

type PRNode

type PRNode struct {
	PullRequest tide.PullRequest `graphql:"... on PullRequest"`
}

type Repo

type Repo struct {
	RetesterPolicy `json:",inline"`
}

Repo is repo level configuration for retester configuration. Policy overridden all general levels.

type RetestController

type RetestController struct {
	// contains filtered or unexported fields
}

RetestController represents a retest controller which controls what the retester does.

func NewController

func NewController(ghClient githubClient, cfg config.Getter, gitClient git.ClientFactory, usesApp bool, cacheFile string, cacheRecordAge time.Duration, config *Config, awsSession *session.Session) *RetestController

NewController generates a retest controller.

func (*RetestController) Run

func (c *RetestController) Run() error

Run implements the business of the controller: filters out the pull requests satisfying the Tide's merge criteria except some required job failed and issue "/retest required" command on them.

type Retester

type Retester struct {
	RetesterPolicy `json:",inline"`
	Oranizations   map[string]Oranization `json:"orgs,omitempty"`
}

Retester is global level configuration for retester configuration. Policy is overridden by specific levels when they are enabled.

type RetesterPolicy

type RetesterPolicy struct {
	MaxRetestsForShaAndBase int   `json:"max_retests_for_sha_and_base,omitempty"`
	MaxRetestsForSha        int   `json:"max_retests_for_sha,omitempty"`
	Enabled                 *bool `json:"enabled,omitempty"`
}

RetesterPolicy for the retester/org/repo. When merging policies, a 0 value results in inheriting the parent policy. False in level repo means disabled repo. Nothing can change that. True/False in level org means enabled/disabled org. But repo can be disabled/enabled.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL