decorators

package
v1.16.0 Latest Latest
Warning

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

Go to latest
Published: Jan 24, 2023 License: MIT Imports: 11 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Create

func Create(features Features, decorators Config) *map[string][]Decorater

Create builds decorators from a config

func Decorate

func Decorate(decorators *map[string][]Decorater, changelog *types.Changelog) (*types.Changelog, error)

Decorate process all defined decorator and apply them against datas

Types

type Config

type Config struct {
	CUSTOMAPI   customAPIConfig
	GITHUBISSUE githubIssueConfig
	JIRAISSUE   jiraIssueConfig
	ENV         envConfig
	SHELL       shellConfig
}

Config centralizes config needed for each decorator

type Decorater

type Decorater interface {
	Decorate(*map[string]interface{}) (*map[string]interface{}, error)
}

Decorater extends data from commit hashmap with data picked from third part apps

type Features

type Features struct {
	ENABLED     bool
	CUSTOMAPI   bool
	JIRAISSUE   bool
	GITHUBISSUE bool
	ENV         bool
	SHELL       bool
}

Features gives which decorators are enabled

Jump to

Keyboard shortcuts

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