Documentation
¶
Overview ¶
Package cmd defines commands of the application.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Changelog ¶ added in v0.2.0
type Changelog struct {
From string `` /* 137-byte string literal not displayed */
To string `long:"to" env:"TO" description:"commit ref to end release notes to" default:"{{ last (filter semver tags) }}"`
Timeout time.Duration `long:"timeout" env:"TIMEOUT" description:"timeout for assembling the release" default:"5m"`
FetchMergeCommitsFilter string `long:"fetch-merge-commits-filter" env:"FETCH_MERGE_COMMITS_FILTER" description:"regexp to filter merge commits" default:".*"`
ConfLocation string `long:"conf-location" env:"CONF_LOCATION" description:"location to the config file" required:"true"`
Extras map[string]string `long:"extras" env:"EXTRAS" env-delim:"," description:"extra variables to use in the template"`
MaxConcurrentPRRequests int `` /* 134-byte string literal not displayed */
CommitsOnly bool `long:"commits-only" env:"COMMITS_ONLY" description:"only include commits, do not try to fetch PRs"`
Engine EngineGroup `group:"engine" namespace:"engine" env-namespace:"ENGINE"`
Notify NotifyGroup `group:"notify" namespace:"notify" env-namespace:"NOTIFY"`
Task TaskGroup `group:"task" namespace:"task" env-namespace:"TASK"`
}
Changelog builds the release-notes from the specified template ands sends it to the desired destinations (telegram, stdout (for CI), etc.).
type EngineGroup ¶ added in v0.7.0
type EngineGroup struct {
Type string `long:"type" env:"TYPE" choice:"github" choice:"gitlab" description:"type of the repository engine" required:"true"`
Github GithubGroup `group:"github" namespace:"github" env-namespace:"GITHUB"`
Gitlab GitlabGroup `group:"gitlab" namespace:"gitlab" env-namespace:"GITLAB"`
}
EngineGroup defines parameters for the engine.
type GithubGroup ¶
type GithubGroup struct {
Repo struct {
FullName string `long:"full-name" env:"FULL_NAME" description:"full name of the repository (owner/name)"`
Owner string `long:"owner" env:"OWNER" description:"owner of the repository"`
Name string `long:"name" env:"NAME" description:"name of the repository"`
} `group:"repo" namespace:"repo" env-namespace:"REPO"`
BasicAuth struct {
Username string `long:"username" env:"USERNAME" description:"username for basic auth"`
Password string `long:"password" env:"PASSWORD" description:"password for basic auth"`
} `group:"basic-auth" namespace:"basic-auth" env-namespace:"BASIC_AUTH"`
Timeout time.Duration `long:"timeout" env:"TIMEOUT" description:"timeout for http requests" default:"5s"`
}
GithubGroup defines parameters to connect to the github repository.
type GithubNotifierGroup ¶
type GithubNotifierGroup struct {
GithubGroup
ReleaseNameTemplate string `long:"release-name-tmpl" env:"RELEASE_NAME_TMPL" description:"template for release name"`
Tag string `long:"tag" env:"TAG" description:"tag to specify release"`
Extras map[string]string `long:"extra" env:"EXTRA" description:"extra parameters to pass to the notifier"`
}
GithubNotifierGroup defines parameters to make release in the github.
type GitlabGroup ¶ added in v0.7.0
type GitlabGroup struct {
Token string `long:"token" env:"TOKEN" description:"token to connect to the gitlab repository"`
BaseURL string `long:"base-url" env:"BASE_URL" description:"base url of the gitlab instance"`
ProjectID string `long:"project-id" env:"PROJECT_ID" description:"project id of the repository"`
Timeout time.Duration `long:"timeout" env:"TIMEOUT" description:"timeout for http requests" default:"5s"`
}
GitlabGroup defines parameters to connect to the gitlab repository.
type Jira ¶ added in v0.9.0
type Jira struct {
BaseURL string `long:"base-url" env:"BASE_URL" description:"url of the jira instance"`
Token string `long:"token" env:"TOKEN" description:"token to connect to the jira instance"`
Timeout time.Duration `long:"timeout" env:"TIMEOUT" description:"timeout for http requests" default:"5s"`
Enricher struct {
LoadWatchers bool `long:"load-watchers" env:"LOAD_WATCHERS" description:"load watchers for the issue"`
} `group:"enricher" namespace:"enricher" env-namespace:"ENRICHER"`
}
Jira defines parameters for the jira task tracker.
type MattermostBotGroup ¶ added in v0.8.0
type MattermostBotGroup struct {
BaseURL string `long:"base-url" env:"BASE_URL" description:"base url for mattermost API"`
Token string `long:"token" env:"TOKEN" description:"token of the mattermost bot"`
ChannelID string `long:"channel-id" env:"CHANNEL_ID" description:"channel id of the mattermost bot"`
Timeout time.Duration `long:"timeout" env:"TIMEOUT" description:"timeout for http requests" default:"5s"`
}
MattermostBotGroup defines parameters for mattermost bot notifier.
type MattermostHookGroup ¶ added in v0.8.0
type MattermostHookGroup struct {
URL []string `long:"url" env:"URL" env-delim:"," description:"url of the mattermost hook, can take multiple values, delim envs with ','"`
Timeout time.Duration `long:"timeout" env:"TIMEOUT" description:"timeout for http requests" default:"5s"`
}
MattermostHookGroup defines parameters for mattermost hook notifier.
type NotifyGroup ¶ added in v0.7.0
type NotifyGroup struct {
Telegram TelegramGroup `group:"telegram" namespace:"telegram" env-namespace:"TELEGRAM"`
Github GithubNotifierGroup `group:"github" namespace:"github" env-namespace:"GITHUB"`
Mattermost MattermostHookGroup `group:"mattermost-hook" namespace:"mattermost-hook" env-namespace:"MATTERMOST_HOOK"`
MattermostBot MattermostBotGroup `group:"mattermost-bot" namespace:"mattermost-bot" env-namespace:"MATTERMOST_BOT"`
Post PostGroup `group:"post" namespace:"post" env-namespace:"POST"`
Stdout bool `long:"stdout" env:"STDOUT" description:"print release notes to stdout"`
Stderr bool `long:"stderr" env:"STDERR" description:"print release notes to stderr"`
}
NotifyGroup defines parameters for the notifier.
func (*NotifyGroup) Build ¶ added in v0.7.0
func (r *NotifyGroup) Build() (destinations notify.Destinations, err error)
Build builds the notifier.
type PostGroup ¶ added in v0.7.0
type PostGroup struct {
URL string `long:"url" env:"URL" description:"url to send the release notes"`
Timeout time.Duration `long:"timeout" env:"TIMEOUT" description:"timeout for http requests" default:"5s"`
}
PostGroup defines parameters for post notifier.
type Preview ¶ added in v0.6.0
type Preview struct {
DataFile string `long:"data-file" env:"DATA_FILE" description:"path to the file with release data" required:"true"`
Extras map[string]string `` /* 152-byte string literal not displayed */
ConfLocation string `long:"conf-location" env:"CONF_LOCATION" description:"location to the config file" required:"true"`
}
Preview command prints the release notes to stdout.
type TaskGroup ¶ added in v0.9.0
type TaskGroup struct {
Type string `long:"type" env:"TYPE" choice:"" choice:"jira" description:"type of the task tracker"`
Jira Jira `group:"jira" namespace:"jira" env-namespace:"JIRA"`
}
TaskGroup defines parameters for task service
type TelegramGroup ¶
type TelegramGroup struct {
ChatID string `long:"chat-id" env:"CHAT_ID" description:"id of the chat, where the release notes will be sent"`
Token string `long:"token" env:"TOKEN" description:"bot token"`
WebPagePreview bool `long:"web-page-preview" env:"WEB_PAGE_PREVIEW" description:"request telegram to preview for web links"`
Timeout time.Duration `long:"timeout" env:"TIMEOUT" description:"timeout for http requests" default:"5s"`
}
TelegramGroup defines parameters for telegram notifier.