config

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Feb 1, 2024 License: Apache-2.0 Imports: 4 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 {
	Project          Project          `yaml:"project"`    // Project is meta information of the target project
	SignOff          SignOff          `yaml:"signOff"`    // SignOff used for sending sign-off messages to MS Teams
	FullReleaseEmail FullReleaseEmail `yaml:"email"`      // FullReleaseEmail configures full-release message sending
	Output           string           `yaml:"output"`     // Output directory where generated artifacts are stored
	Confluence       Confluence       `yaml:"confluence"` // Confluence contains credentials and meta to connect to Confluence
}

Config is used by release-automator tools

func LoadConfig

func LoadConfig(path string) (Config, error)

LoadConfig loads configuration file for release-automator tools

type Confluence

type Confluence struct {
	Credentials    Credentials `yaml:"credentials"`    // Credentials - username/token pair to access Confluence
	Endpoint       string      `yaml:"endpoint"`       // Endpoint is url of Confluence API endpoint
	ReleasesPageId string      `yaml:"releasesPageId"` // ReleasesPageId is id number of page with list of project releases
}

Confluence contains data used to access project page at Confluence

type Content

type Content struct {
	Prepend string `yaml:"prepend"` // Prepend is text prepended to generated message
	Append  string `yaml:"append"`  // Append is text appended to generated message
}

Content is used to modify generated message body

type Credentials

type Credentials struct {
	Username    string `yaml:"username"`    // Username usually is email associated with account which has access to Confluence
	AccessToken string `yaml:"accessToken"` // AccessToken used to access Confluence. Can be obtained here: https://id.atlassian.com/manage-profile/security/api-tokens
}

Credentials are username and access token used to access Confluence

type FullReleaseEmail

type FullReleaseEmail struct {
	OutlookWebhook string `yaml:"outlookWebhook"`               // OutlookWebhook used for sending message to Outlook connector. See more how to obtain webhook: https://docs.microsoft.com/en-us/outlook/actionable-messages/send-via-connectors
	Template       string `yaml:"template" validate:"required"` // Template for Outlook message. Golang text-template format is used.
}

FullReleaseEmail configures full-release message sending. It consists of webhook url.

type Mention

type Mention struct {
	Name    string `yaml:"name"`    // Name is visible name of a mentioned person
	TeamsID string `yaml:"teamsID"` // TeamsID usually is Microsoft email
}

Mention is used for mentioning a person in MS Teams message

type Project

type Project struct {
	Name          string `yaml:"name"`          // Name of the project
	ChangelogPath string `yaml:"changelogPath"` // ChangelogPath is path to changelog.md file of the project
	Repository    string `yaml:"repository"`    // Repository is a url to project repository
}

Project meta information and path to changelog file

type SignOff

type SignOff struct {
	TeamsWebhook string    `yaml:"teamsWebhook"` // TeamsWebhook can be obtained from Teams Connector. See more: https://docs.microsoft.com/en-us/microsoftteams/platform/webhooks-and-connectors/how-to/add-incoming-webhook
	Mentions     []Mention `yaml:"mentions"`     // Mentions is list of contacts to mention in Signoff message
	Content      Content   `yaml:"content"`      // Content of the message
}

SignOff contains Webhook URL to connector app and list of people to mention

Jump to

Keyboard shortcuts

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