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
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.