Documentation
¶
Index ¶
- func CheckAssignees(log *logrus.Logger, pull PullRequestAssignee) error
- func CheckBody(log *logrus.Logger, pull PullRequestBody, split string, minimum int) error
- func CheckLabels(log *logrus.Logger, pull PullRequestLabels, prefixes []string, mode string) error
- func CheckTitle(log *logrus.Logger, pull PullRequestTitle, minimum int) error
- func RunAutomations(logger *logrus.Logger, pull *github.PullRequest) error
- func RunChecks(logger *logrus.Logger, pull PullRequest, options *Options) error
- type Options
- type PullRequest
- type PullRequestAssignee
- type PullRequestBody
- type PullRequestLabels
- type PullRequestTitle
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckAssignees ¶ added in v1.3.0
func CheckAssignees(log *logrus.Logger, pull PullRequestAssignee) error
Check the title of the pull request to validate that it is at least the minimum length required, and return an error if it is not
func CheckBody ¶ added in v1.2.0
Check the body of the pull request to validate that it is at least the minimum length required, and return an error if it is not
func CheckLabels ¶
Check the labels of the pull request to validate that the prefixes requested have been attached, and return an error if it is not
func CheckTitle ¶
func CheckTitle(log *logrus.Logger, pull PullRequestTitle, minimum int) error
Check the title of the pull request to validate that it is at least the minimum length required, and return an error if it is not
func RunAutomations ¶ added in v1.1.0
func RunAutomations(logger *logrus.Logger, pull *github.PullRequest) error
Types ¶
type PullRequest ¶ added in v1.2.0
type PullRequest interface { PullRequestTitle PullRequestLabels PullRequestBody PullRequestAssignee GetOwner() string GetRepository() string GetNumber() int }
type PullRequestAssignee ¶ added in v1.3.0
type PullRequestAssignee interface { GetUser() *github.User GetAssignees() []*github.User SetAssignee([]string) error }
Define an Interface which maps to the GetAssignee function on the type so that we can simplify the requirements of the value passed and improve testability
type PullRequestBody ¶ added in v1.2.0
type PullRequestBody interface {
GetBody() string
}
Define an Interface which maps to the GetBody function on the type so that we can simplify the requirements of the value passed and improve testability
type PullRequestLabels ¶ added in v1.1.0
Define an Interface which maps to the GetLabels function on the type so that we can simplify the requirements of the value passed and improve testability
type PullRequestTitle ¶ added in v1.1.0
type PullRequestTitle interface {
GetTitle() string
}
Define an Interface which maps to the GetTitle function on the type so that we can simplify the requirements of the value passed and improve testability