githubrelease

package
v0.99.0 Latest Latest
Warning

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

Go to latest
Published: May 2, 2025 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DeprecatedKeyTagHash = "hash"
	DeprecatedKeyTagName = "name"
	KeyTagName           = "tagname"
	KeyTagHash           = "taghash"
	KeyTitle             = "title"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type GitHubRelease

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

GitHubRelease defines a resource of kind "githubrelease"

func New

func New(spec interface{}) (*GitHubRelease, error)

New returns a new valid GitHubRelease object.

func (GitHubRelease) Changelog

func (gr GitHubRelease) Changelog(from, to string) *result.Changelogs

Changelog returns the content (body) of the GitHub Release

func (GitHubRelease) Condition

func (gr GitHubRelease) Condition(source string, scm scm.ScmHandler) (pass bool, message string, err error)

func (*GitHubRelease) ReportConfig added in v0.99.0

func (g *GitHubRelease) ReportConfig() interface{}

ReportConfig returns a new configuration object with only the necessary fields to identify the resource without any sensitive information and context specific data.

func (*GitHubRelease) Source

func (gr *GitHubRelease) Source(workingDir string, resultSource *result.Source) error

Source retrieves a specific version tag name, tag hash, or release title from GitHub Releases.

func (GitHubRelease) Target

func (ghr GitHubRelease) Target(source string, scm scm.ScmHandler, dryRun bool, resultTarget *result.Target) error

type Spec added in v0.22.3

type Spec struct {
	// owner defines repository owner to interact with.
	//
	// required: true
	//
	// compatible:
	//  * source
	//  * condition
	//
	Owner string `yaml:",omitempty" jsonschema:"required"`
	// repository defines the repository name to interact with.
	//
	// required: true
	//
	// compatible:
	//  * source
	//  * condition
	//
	Repository string `yaml:",omitempty" jsonschema:"required"`
	// token defines the GitHub personal access token used to authenticate with.
	//
	// more information on https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens
	//
	// required: true
	//
	// compatible:
	//  * source
	//  * condition
	//
	Token string `yaml:",omitempty" jsonschema:"required"`
	// URL defines the default github url in case of GitHub enterprise.
	//
	// default: https://github.com
	//
	// compatible:
	//  * source
	//  * condition
	URL string `yaml:",omitempty"`
	// username defines the username used to authenticate with GitHub API.
	//
	// compatible:
	//  * source
	//  * condition
	Username string `yaml:",omitempty"`
	// versionFilter provides parameters to specify version pattern and its type like regex, semver, or just latest.
	//
	// default: latest
	//
	// compatible:
	//  * source
	//
	VersionFilter version.Filter `yaml:",omitempty"`
	// typeFilter specifies the GitHub Release type to retrieve before applying the versionfilter rule
	//
	// default:
	//  * draft: false
	//  * prerelease: false
	//  * release: true
	//  * latest: false
	//
	// compatible:
	//  * source
	// 	* condition
	//
	TypeFilter github.ReleaseType `yaml:",omitempty"`
	// tag allows to check for a specific release tag, release tag hash, or release title depending on a the parameter key.
	//
	// compatible:
	//   * condition
	//
	// default: source input
	//
	Tag string `yaml:",omitempty"`
	// "key" defines the GitHub release information we are looking for.
	// It accepts one of the following inputs:
	//    * "name": returns the "latest" tag name
	//    * "hash": returns the commit associated with the latest tag name
	//    * "title": returns the latest release title
	//
	// accepted values:
	//  * taghash
	//  * tagname
	//  * title
	//  * hash (deprecated)
	//  * name (deprecated)
	//
	// default: 'tagname'
	//
	// compatible:
	//   * source
	//   * condition
	Key string `yaml:",omitempty"`
}

Spec defines a specification for a "gittag" resource parsed from an updatecli manifest file

Jump to

Keyboard shortcuts

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