From 8bf3c898776467b7749dc5c674e61f9fa9ee07f6 Mon Sep 17 00:00:00 2001 From: "luke.blackburn-bcb" Date: Mon, 9 Sep 2024 20:58:32 +0100 Subject: [PATCH] feat: tidying logging --- cmd/trigger.go | 12 +++++++++++- main.go | 0 2 files changed, 11 insertions(+), 1 deletion(-) mode change 100644 => 100755 main.go diff --git a/cmd/trigger.go b/cmd/trigger.go index c5e72ee..76efcd2 100644 --- a/cmd/trigger.go +++ b/cmd/trigger.go @@ -48,7 +48,17 @@ var Trigger = &cobra.Command{ foundBranch := false errName := project.Name if errName == "" { - errName = string(project.ID) + var idStr, serviceNameStr string + + if project.ID != -1 { + idStr = fmt.Sprintf("%v", project.ID) + } + + if project.ServiceName != "" { + serviceNameStr = project.ServiceName + } + + errName = fmt.Sprintf("Project ID: %s, ServiceName: %s", idStr, serviceNameStr) } for _, lookup := range searchBranches { err = project.SetBranch(lookup) diff --git a/main.go b/main.go old mode 100644 new mode 100755