Documentation ¶
Index ¶
Constants ¶
const ( // JenkinsBaseUrl is the base URL for the Jenkins CI server. JenkinsBaseUrl = "https://leeroy.dockerproject.org/build/retry" // FailingCILabel is the label that indicates that a pull request is // failing for a legitimate reason and should be ignored. FailingCILabel = "status/failing-ci" // PouleToken is injected as an HTML comment in the body of all messages // posted by the tool itself. PouleToken = "AUTOMATED:POULE" // PouleConfigurationFile is the name of the special file at the root of the repository. PouleConfigurationFile = "poule.yml" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Action ¶
type Action struct { // Triggers is the collection of GitHub events that should trigger the action. The keys must be // valid GitHub event types (e.g., "pull_request"), and the value must be a list of alid values // for the action field of the GitHub paylost (e.g., "created"). Triggers Trigger `yaml:"triggers"` // Operations to apply to all repositories when any trigger is met. Operations []OperationConfiguration `yaml:"operations"` }
Action is the definition of an action: it descrbibes operations to apply when any of the associated triggers are met.
type Config ¶
type Config struct { RunDelay time.Duration `yaml:"delay"` DryRun bool `yaml:"dry_run"` Repository string `yaml:"repository"` Token string `yaml:"token"` TokenFile string `yaml:"token_file"` }
Config is the main configuration object for poule.
func FromGlobalFlags ¶
FromGlobalFlags creates a configuration object from command line flags.
func (*Config) SplitRepository ¶
SplitRepository returns the username and repository associated with the configuration.
type OperationConfiguration ¶
type OperationConfiguration struct { Type string `yaml:"type"` Filters map[string]interface{} `yaml:"filters"` Settings map[string]interface{} `yaml:"settings"` }
OperationConfiguration describes an operation.
type Server ¶
type Server struct { Config `yaml:",inline"` LookupdAddr string `yaml:"nsq_lookupd"` Channel string `yaml:"nsq_channel"` // Repositories maps GitHub repositories full names their corresponding // NSQ topic. Repositories map[string]string `yaml:"repositories"` // CommonActions defines the triggers and operations which apply to every configured repository. CommonActions []Action `yaml:"common_configuration"` }
Server is the configuration object for the server mode.
type StringSlice ¶
type StringSlice []string
StringSlice is a slice of strings.
func (StringSlice) Contains ¶
func (s StringSlice) Contains(item string) bool
Contains returns whether the StringSlice contains a given item.
type Trigger ¶
type Trigger map[string]StringSlice
Trigger associates a GitHub event type (e.g., "issues", or "pull request") with a collection of corresponding actions (e.g., [ "opened", "reopened" ]).