From 5bb90ba5cad4c2de52cdb17a7438c82b53b3c52b Mon Sep 17 00:00:00 2001 From: "Knupfer, Raffael" Date: Tue, 27 May 2025 09:25:53 +0200 Subject: [PATCH] fix: length restriction and wrong transfer from exemption errors from one file to the next file --- internal/service/check/check.go | 4 ++-- internal/service/check/yamlwalker_exemptions.go | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/internal/service/check/check.go b/internal/service/check/check.go index 6d10077..8b62b86 100644 --- a/internal/service/check/check.go +++ b/internal/service/check/check.go @@ -207,8 +207,8 @@ func walkerToCheckRunOutput(johnnie *MetadataWalker) CheckResult { actionLabel := "Fix formatting" description := "Adds a new commit with fixed formatting." if len(johnnie.hasMissingRequiredConditionExemptions) > 0 { - actionLabel = "Fix missing exemptions" - description = "Adds a new commit with missing exemptions." + actionLabel = "Fix exemptions" + description = "Adds a new commit with exemptions." } result.actions = []*github.CheckRunAction{ { diff --git a/internal/service/check/yamlwalker_exemptions.go b/internal/service/check/yamlwalker_exemptions.go index 36dfa8b..c65265e 100644 --- a/internal/service/check/yamlwalker_exemptions.go +++ b/internal/service/check/yamlwalker_exemptions.go @@ -101,6 +101,7 @@ func (v *MetadataWalker) fixExemptionsInFile(fileContents []byte, path string) e if err != nil { return err } + v.hasMissingRequiredConditionExemptions = nil return v.formatSingleYamlFile(fixed, path) } }