diff --git a/pkg/labeler/labeler.go b/pkg/labeler/labeler.go index 73344c5..fd62608 100644 --- a/pkg/labeler/labeler.go +++ b/pkg/labeler/labeler.go @@ -44,10 +44,11 @@ func NewLabeler(cfg Config, gh *github.Client, logger log.Logger) *Labeler { func (l *Labeler) Run(issue *github.Issue) error { if !l.hasRequiredLabels(issue) { + level.Info(l.logger).Log("msg", "issue has none of the required labels", "requireLabel", strings.Join(l.cfg.RequireLabel, ", ")) return nil } - level.Info(l.logger).Log("msg", "issue has the required labels", "required_labels", strings.Join(l.cfg.RequireLabel, ", ")) + level.Info(l.logger).Log("msg", "issue has at least one of the required labels", "requireLabel", strings.Join(l.cfg.RequireLabel, ", ")) if l.hasAssignableLabel(issue) { return nil @@ -163,9 +164,5 @@ func (l *Labeler) hasRequiredLabels(issue *github.Issue) bool { } - if !match { - level.Info(l.logger).Log("msg", "issue has none of the required labels", "requireLabel", strings.Join(l.cfg.RequireLabel, ",")) - } - return match }