File tree Expand file tree Collapse file tree 1 file changed +12
-1
lines changed
Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -11,6 +11,8 @@ import (
1111 "driftive.cloud/api/pkg/usecase/utils/parsing"
1212 "errors"
1313 "fmt"
14+ "strings"
15+
1416 "github.com/gofiber/fiber/v2"
1517 "github.com/gofiber/fiber/v2/log"
1618 "github.com/google/uuid"
@@ -47,6 +49,15 @@ func NewDriftStateHandler(
4749 }
4850}
4951
52+ func providerToSlug (provider string ) string {
53+ switch provider {
54+ case "GITHUB" :
55+ return "gh"
56+ default :
57+ return strings .ToLower (provider )
58+ }
59+ }
60+
5061func projectTypeToDBString (projectType ProjectType ) (string , error ) {
5162 switch projectType {
5263 case Terraform :
@@ -168,7 +179,7 @@ func (d *DriftStateHandler) HandleUpdate(c *fiber.Ctx) error {
168179 // Build dashboard URL: /:provider/:org/:repo/run/:run_uuid
169180 dashboardURL := fmt .Sprintf ("%s/%s/%s/%s/run/%s" ,
170181 d .cfg .Frontend .FrontendURL ,
171- org .Provider ,
182+ providerToSlug ( org .Provider ) ,
172183 org .Name ,
173184 repo .Name ,
174185 runUUID .String (),
You can’t perform that action at this time.
0 commit comments