From 475e7bc71978b1b1a0f2f1140ca41e654c4d888f Mon Sep 17 00:00:00 2001 From: Raphael Aurich Date: Fri, 15 Nov 2024 19:07:06 +0100 Subject: [PATCH] fix: Check for both .yml and .yaml configs --- ciplatforms/internal/github/api.go | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/ciplatforms/internal/github/api.go b/ciplatforms/internal/github/api.go index 7cb6697..5b1637a 100644 --- a/ciplatforms/internal/github/api.go +++ b/ciplatforms/internal/github/api.go @@ -178,12 +178,14 @@ func updateRepos(batch []*Repository, data map[string]interface{}) error { return nil } -// hasYmlFile checks if any entry in the entries slice is a YAML file. +// hasYmlFile checks if any entry in the entries slice is a YAML file with a .yml or .yaml extension. func hasYmlFile(entries []interface{}) bool { for _, entry := range entries { if entryMap, ok := entry.(map[string]interface{}); ok { - if name, ok := entryMap["name"].(string); ok && strings.HasSuffix(name, ".yml") { - return true + if name, ok := entryMap["name"].(string); ok { + if strings.HasSuffix(name, ".yml") || strings.HasSuffix(name, ".yaml") { + return true + } } } }