Skip to content

Commit

Permalink
Improve logs (#125)
Browse files Browse the repository at this point in the history
Signed-off-by: Galo Navarro <anglorvaroa@gmail.com>
  • Loading branch information
srvaroa committed Dec 10, 2023
1 parent 5789c33 commit 69c414f
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions pkg/labeler.go
Expand Up @@ -151,9 +151,14 @@ func (l *Labeler) ExecuteOn(target *Target) error {
log.Printf("Matching labels on target %+v", target)

config, err := l.FetchRepoConfig()
if err != nil {
log.Printf("Unable to load configuration %+v", err)
return err
}

labelUpdates, err := l.findMatches(target, config)
if err != nil {
log.Printf("Unable to find matches %+v", err)
return err
}

Expand Down Expand Up @@ -225,6 +230,7 @@ func (l *Labeler) findMatches(target *Target, config *LabelerConfigV1) (LabelUpd

for _, matcher := range config.Labels {
label := matcher.Label
log.Printf("Evaluating label %s", label)

if labelUpdates.set[label] {
// This label was already matched in another matcher
Expand Down

0 comments on commit 69c414f

Please sign in to comment.