Documentation ¶
Index ¶
Constants ¶
View Source
const ( PolicyName ds.PolicyName = "rd" // RequiredDevelopersCount number of developers to be picked (also count of dev approves) RequiredDevelopersCount = 2 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GitlabClient ¶
type GitlabClient interface { // SetReviewers overwrites reviewers list for the merge request SetReviewers(mr *ds.MergeRequest, reviewers []int) error }
type Policy ¶
type Policy struct {
// contains filtered or unexported fields
}
func New ¶
func New(r Repository, g GitlabClient) *Policy
func (*Policy) ApprovedByPolicy ¶
func (*Policy) ApprovedByUser ¶
func (*Policy) ProcessChanges ¶
type Repository ¶
type Repository interface { // PolicyMetadata returns policy metadata for the given merge request PolicyMetadata(mr *ds.MergeRequest, team *ds.Team, policy ds.PolicyName) (bson.Raw, error) // UpdatePolicyMetadata updates policy metadata for the given merge request UpdatePolicyMetadata(mr *ds.MergeRequest, team *ds.Team, policy ds.PolicyName, d bson.Raw) error }
Click to show internal directories.
Click to hide internal directories.