Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Bitbucket ¶
type Bitbucket struct { Host string `mapstructure:"host"` Username string `mapstructure:"username"` Password string `mapstructure:"password"` APIKey string `mapstructure:"api_key"` Project string `mapstructure:"project"` Repository string `mapstructure:"repository"` }
Bitbucket credentials/options. Either add Username+Password OR a APIKey
type Command ¶ added in v1.6.3
type Command struct { Name string Description string Trigger string Category string Commands []string Examples []string }
Command represents a single macro which is defined by a trigger regexp and a list of executed commands
type Config ¶
type Config struct { Slack Slack `mapstructure:"slack"` Server Server `mapstructure:"server"` Jenkins Jenkins `mapstructure:"jenkins"` Jira Jira `mapstructure:"jira"` StoragePath string `mapstructure:"storage_path"` Bitbucket Bitbucket `mapstructure:"bitbucket"` Github struct { AccessToken string `mapstructure:"access_token"` } Gitlab struct { AccessToken string Host string } Commands []Command `mapstructure:"commands"` Crons []Cron `mapstructure:"crons"` Logger Logger `mapstructure:"logger"` // @deprecated BranchLookup struct { Type string // stash/bitbucket/git/null Repository string } `mapstructure:"branch_lookup"` AllowedUsers UserList `mapstructure:"allowed_users,flow"` AdminUsers UserList `mapstructure:"admin_users,flow"` OpenWeather OpenWeather `mapstructure:"open_weather"` PullRequest PullRequest `mapstructure:"pullrequest"` Timezone string `mapstructure:"timezone"` }
Config contains the full config structure of this bot
type Cron ¶
type Cron struct { Channel string `mapstructure:"channel"` Schedule string `mapstructure:"schedule"` Commands []string `mapstructure:"commands"` }
Cron is represents a single cron which can be configured
type Jenkins ¶
type Jenkins struct { Host string Username string Password string Jobs JenkinsJobs }
Jenkins is the main Jenkins config, including credentials and the whitelisted jobs
type JenkinsJobs ¶
JenkinsJobs is the list of all (whitelisted) Jenkins jobs
func (JenkinsJobs) GetSortedNames ¶ added in v1.6.4
func (j JenkinsJobs) GetSortedNames() []string
get all defined job names, sorted by name
type JiraField ¶
JiraField are custom Jira issue fields which should be displayed in the search/output Icons can be provided to have special mapping, e.g. for bug type or different priorities
type JobConfig ¶
type JobConfig struct { Parameters []JobParameter Trigger string OnStart []string OnSuccess []string OnFailure []string }
JobConfig concrete job configuration -> only defined jobs are (re)startable
type JobParameter ¶
JobParameter are defined build parameters per job
type OpenWeather ¶
OpenWeather is an optional feature to get current weather
type PullRequest ¶ added in v1.6.0
type PullRequest struct { // able to set a custom "approved" reactions to see directly who or which component/department approved a pullrequest CustomApproveReaction map[string]string `mapstructure:"custom_approve_reaction"` }
PullRequest special configuration to change the pull request behavior
type Server ¶
type Slack ¶
type Slack struct { Token string `mapstructure:"token"` AllowedGroups []string `mapstructure:"allowed_groups,flow"` ErrorChannel string `mapstructure:"error_channel"` Debug bool `mapstructure:"debug"` UseEventAPI bool `mapstructure:"use_event_api"` // only used for integration tests TestEndpointURL string `mapstructure:"-"` }
Slack contains the credentials and configuration of the Slack client