Documentation
¶
Index ¶
- func IsValid(result []*entity.ValidationResult) bool
- func NewBodyValidator(_ internal.GithubClient, config *entity.Configuration) internal.Validator
- func NewBranchValidator(_ internal.GithubClient, config *entity.Configuration) internal.Validator
- func NewCommitValidator(client internal.GithubClient, config *entity.Configuration) internal.Validator
- func NewFileValidator(_ internal.GithubClient, config *entity.Configuration) internal.Validator
- func NewIssueValidator(client internal.GithubClient, config *entity.Configuration) internal.Validator
- func NewTitleValidator(_ internal.GithubClient, config *entity.Configuration) internal.Validator
- type ValidatorGroup
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsValid ¶
func IsValid(result []*entity.ValidationResult) bool
IsValid checks if a pull request is valid or not from validation results
func NewBodyValidator ¶
func NewBodyValidator( _ internal.GithubClient, config *entity.Configuration, ) internal.Validator
NewBodyValidator creates a new validator that validates if a pull request has a non-empty body
func NewBranchValidator ¶
func NewBranchValidator( _ internal.GithubClient, config *entity.Configuration, ) internal.Validator
NewBranchValidator creates a validator that validates pull request branch name
func NewCommitValidator ¶
func NewCommitValidator( client internal.GithubClient, config *entity.Configuration, ) internal.Validator
NewCommitValidator creates a new validator that will validate all commit messages in a pull request
func NewFileValidator ¶
func NewFileValidator( _ internal.GithubClient, config *entity.Configuration, ) internal.Validator
NewFileValidator creates a new validator that validates if a pull request introduces too many file changes
func NewIssueValidator ¶
func NewIssueValidator( client internal.GithubClient, config *entity.Configuration, ) internal.Validator
NewIssueValidator creates a new validator that validates issue resolution
func NewTitleValidator ¶
func NewTitleValidator( _ internal.GithubClient, config *entity.Configuration, ) internal.Validator
NewTitleValidator creates a new validator that validates a pull request title
Types ¶
type ValidatorGroup ¶
type ValidatorGroup struct {
// contains filtered or unexported fields
}
ValidatorGroup is a collection of validation process, integrated in one function call
func NewValidatorGroup ¶
func NewValidatorGroup( client internal.GithubClient, config *entity.Configuration, wg *sync.WaitGroup, ) *ValidatorGroup
NewValidatorGroup creates a new ValidatorGroup
func (*ValidatorGroup) Process ¶
func (v *ValidatorGroup) Process( ctx context.Context, pullRequest *entity.PullRequest, ) []*entity.ValidationResult
Process the pull request with all available validators