@@ -15,6 +15,7 @@ import (
1515 "os"
1616 "path"
1717 "path/filepath"
18+ "strings"
1819 "time"
1920)
2021
@@ -129,7 +130,8 @@ func (d DiggerApi) ReportProjectRun(namespace string, projectName string, starte
129130 return nil
130131}
131132
132- func (d DiggerApi ) ReportProjectJobStatus (repo string , projectName string , jobId string , status string , timestamp time.Time , summary * iac_utils.IacSummary , planJson string , PrCommentUrl string , terraformOutput string , iacUtils iac_utils.IacUtils ) (* scheduler.SerializedBatch , error ) {
133+ func (d DiggerApi ) ReportProjectJobStatus (repoFullName string , projectName string , jobId string , status string , timestamp time.Time , summary * iac_utils.IacSummary , planJson string , PrCommentUrl string , terraformOutput string , iacUtils iac_utils.IacUtils ) (* scheduler.SerializedBatch , error ) {
134+ repoNameForBackendReporting := strings .ReplaceAll (repoFullName , "/" , "-" )
133135 u , err := url .Parse (d .DiggerHost )
134136 if err != nil {
135137 log .Fatalf ("Not able to parse digger cloud url: %v" , err )
@@ -152,7 +154,7 @@ func (d DiggerApi) ReportProjectJobStatus(repo string, projectName string, jobId
152154 }
153155 }
154156
155- u .Path = filepath .Join (u .Path , "repos" , repo , "projects" , projectName , "jobs" , jobId , "set-status" )
157+ u .Path = filepath .Join (u .Path , "repos" , repoNameForBackendReporting , "projects" , projectName , "jobs" , jobId , "set-status" )
156158 request := map [string ]interface {}{
157159 "status" : status ,
158160 "timestamp" : timestamp ,
0 commit comments