-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
26 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
package checks | ||
|
||
import ( | ||
"github.com/GEPROG/lassie-bot-dog/plugins/auto_merge/config" | ||
"github.com/xanzy/go-gitlab" | ||
) | ||
|
||
type HasMilestone struct { | ||
} | ||
|
||
func (check HasMilestone) Check(_ *config.AutoMergeConfig, _ *gitlab.Project, mergeRequest *gitlab.MergeRequest) bool { | ||
return mergeRequest.Milestone != nil | ||
} | ||
|
||
func (check HasMilestone) Name() string { | ||
return "has-milestone" | ||
} | ||
|
||
func (check HasMilestone) PassedText(_ int) string { | ||
return "Your Merge-Request has a milestone assigned" | ||
} | ||
|
||
func (check HasMilestone) FailedText(_ int) string { | ||
return "Your Merge-Request has no milestone assigned" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters