branch

package
v0.35.1 Latest Latest
Warning

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

Go to latest
Published: Oct 9, 2022 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Gitea

type Gitea struct {
	HeadBranch string
	// contains filtered or unexported fields
}

Gitea contains information to interact with Gitea api

func New

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

New returns a new valid Gitea object.

func (*Gitea) Changelog

func (g *Gitea) Changelog() string

Changelog returns the changelog for this resource, or an empty string if not supported

func (*Gitea) Condition

func (g *Gitea) Condition(source string) (bool, error)

func (*Gitea) ConditionFromSCM

func (g *Gitea) ConditionFromSCM(source string, scm scm.ScmHandler) (bool, error)

func (*Gitea) SearchBranches

func (g *Gitea) SearchBranches() (tags []string, err error)

Retrieve gitea branches from a remote gitea repository

func (*Gitea) Source

func (g *Gitea) Source(workingDir string) (string, error)

func (*Gitea) Target

func (g *Gitea) Target(source string, dryRun bool) (bool, error)

Target ensure that a specific release exist on gitea, otherwise creates it

func (Gitea) TargetFromSCM

func (g Gitea) TargetFromSCM(source string, scm scm.ScmHandler, dryRun bool) (bool, []string, string, error)

type Spec

type Spec struct {
	client.Spec `yaml:",inline,omitempty"`
	// [S][C] Owner specifies repository owner
	Owner string `yaml:",omitempty" jsonschema:"required"`
	// [S][C] Repository specifies the name of a repository for a specific owner
	Repository string `yaml:",omitempty" jsonschema:"required"`
	// [S] VersionFilter provides parameters to specify version pattern and its type like regex, semver, or just latest.
	VersionFilter version.Filter `yaml:",omitempty"`
	// [C] Branch specifies the branch name
	Branch string `yaml:",omitempty"`
}

Spec defines settings used to interact with Gitea release

func (Spec) Validate

func (s Spec) Validate() error

Jump to

Keyboard shortcuts

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