Skip to content

Commit 8bf3c89

Browse files
author
luke.blackburn-bcb
committed
feat: tidying logging
1 parent 0be5c28 commit 8bf3c89

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

cmd/trigger.go

+11-1
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,17 @@ var Trigger = &cobra.Command{
4848
foundBranch := false
4949
errName := project.Name
5050
if errName == "" {
51-
errName = string(project.ID)
51+
var idStr, serviceNameStr string
52+
53+
if project.ID != -1 {
54+
idStr = fmt.Sprintf("%v", project.ID)
55+
}
56+
57+
if project.ServiceName != "" {
58+
serviceNameStr = project.ServiceName
59+
}
60+
61+
errName = fmt.Sprintf("Project ID: %s, ServiceName: %s", idStr, serviceNameStr)
5262
}
5363
for _, lookup := range searchBranches {
5464
err = project.SetBranch(lookup)

main.go

100644100755
File mode changed.

0 commit comments

Comments
 (0)