inputs

package
v0.8.1 Latest Latest
Warning

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

Go to latest
Published: Mar 2, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TagMajorName string = "major"
	TagMinorName string = "minor"
	TagPatchName string = "patch"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Inputs

type Inputs struct {
	GitHubToken       string
	Owner             string
	Repository        string
	PullRequestNumber int
	DefaultTag        string
	TagPrefix         string
}

func GetInputs

func GetInputs() (Inputs, error)

GetInputs returns the inputs for the gh

func (Inputs) GetDefaultTag added in v0.8.1

func (i Inputs) GetDefaultTag() string

type PullRequestLabels

type PullRequestLabels struct {
	Major  bool
	Minor  bool
	Patch  bool
	Custom string

	Tag *Tag
}

func GetPRLabels

func GetPRLabels(labels []*github.Label) PullRequestLabels

GetPRLabels returns a list of labels for a PR

type Tag

type Tag struct {
	// contains filtered or unexported fields
}

func GetNewTag

func GetNewTag(currentVersion string, prLabels PullRequestLabels) (Tag, error)

GetNewTag returns a new tag based on the current tag and the PullRequestLabels

func (*Tag) GetMajor

func (t *Tag) GetMajor() int

GetMajor sets the major version

func (*Tag) GetMinor

func (t *Tag) GetMinor() int

GetMinor sets the minor version

func (*Tag) GetPatch

func (t *Tag) GetPatch() int

GetPatch sets the patch version

func (*Tag) Set

func (t *Tag) Set(name string, value int)

Set sets the custom version

func (*Tag) SetMajor

func (t *Tag) SetMajor(val int)

SetMajor sets the major version

func (*Tag) SetMinor

func (t *Tag) SetMinor(val int)

SetMinor sets the minor version

func (*Tag) SetPatch

func (t *Tag) SetPatch(val int)

SetPatch sets the patch version

func (*Tag) String

func (t *Tag) String() string

func (*Tag) StringWithPrefix

func (t *Tag) StringWithPrefix(prefix string) string

Jump to

Keyboard shortcuts

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