package enforcemilestone import ( "github.com/google/go-github/v47/github" "edge-infra.dev/pkg/f8n/devinfra/jack/constants" "edge-infra.dev/pkg/f8n/devinfra/jack/plugin" ) func init() { plugin.RegisterIssueHandler(constants.PluginEnforceMilestone, handleIssue) } func handleIssue(hp plugin.HandlerParams, ie github.IssuesEvent) { hp.Log.WithName(constants.PluginEnforceMilestone) switch action := ie.GetAction(); action { case "opened": openingMilestone(hp, ie) case "labeled": checkLabel(hp, ie) case "unlabeled": checkRemoveLabel(hp, ie) case "milestoned": removeMilestoneLabel(hp, ie) } }