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 defines the pullRequest title Title string // Kind defines the pullRequest `kind` which affects accepted "spec" values Kind string // Spec defines parameters for a specific "kind" Spec interface{} // scmid references an scm configuration defined within the updatecli manifest ScmID string // !Deprecated in favor for `scmid` // scmid references an scm configuration defined within the updatecli manifest DeprecatedScmID string `yaml:"scmID"` // Targets defines a list of target related to the pullRequest Targets []string }
Config define pullRequest provided via an updatecli configuration
func (Config) JSONSchema ¶ added in v0.23.0
JSONSchema implements the json schema interface to generate the "pullrequest" jsonschema
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
Click to show internal directories.
Click to hide internal directories.