pullrequest

package
v0.18.0 Latest Latest
Warning

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

Go to latest
Published: Jan 11, 2022 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrWrongConfig is returned when a pullrequest has missing mandatory attributes.
	ErrWrongConfig = errors.New("wrong pull request configuration")
)

Functions

This section is empty.

Types

type Config

type Config struct {
	Title   string      // Defines the pullRequest Title
	Kind    string      // Defines the pullRequest kind
	Spec    interface{} // Defines specific parameters
	ScmID   string      `yaml:"scmID"` // References a scm configuration
	Targets []string    // DependsOnTargets defines a list of target related to the pullRequest
}

Config define pullRequest provided via an updatecli configuration

func (*Config) Validate

func (c *Config) Validate() (err error)

Validate ensures that a pullRequest configuration has required parameters.

type PullRequest

type PullRequest struct {
	Title          string
	Changelog      string
	PipelineReport string
	Config         *Config
	Scm            *scm.Scm
	Handler        PullRequestHandler
}

PullRequest is a struct used by an updatecli pipeline.

func New

func New(config *Config, sourceControlManager *scm.Scm) (PullRequest, error)

New returns a new PullRequest based on a pullrequest config and an scm

func (*PullRequest) Update

func (p *PullRequest) Update() error

Update updates a pullRequest object based on its configuration

type PullRequestHandler

type PullRequestHandler interface {
	CreatePullRequest(title, changelog, pipelineReport string) error
}

PullRequestHandler interface defines required functions to be an pullRequest

Jump to

Keyboard shortcuts

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