Documentation ¶
Index ¶
Constants ¶
View Source
const ( PolicyName ds.PolicyName = "tlar" // RequiredLeadsCount number of lead to be picked as reviewers (also count of lead approves) RequiredLeadsCount = 1 // RequiredDevelopersCount number of developers to be picked as reviewers RequiredDevelopersCount = 1 )
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.