package epics 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.PluginEpics, handleIssue) } func handleIssue(hp plugin.HandlerParams, ce github.IssuesEvent) { hp.Log.WithName(constants.PluginEpics) log := hp.Log ctx := hp.Ctx client := hp.Client switch action := ce.GetAction(); action { case "edited": //log.Info().Msg("not handling edit currently.") if err := verifyEditedEpic(ctx, log, client, ce); err != nil { log.Error(err, "Error in verifying edited epic") } case "labeled": if err := labelAdded(ctx, log, client, ce); err != nil { log.Error(err, "Error in labelAdded") } case "unlabeled": if err := labelRemoved(ctx, log, client, ce); err != nil { log.Error(err, "Error in labelRemoved") } } }