@@ -118,10 +118,9 @@ func CreateFinalizedEvent(xrayVersion, multiScanId string, startTime time.Time,
118118 }
119119}
120120
121- func SendGitIntegrationEvent (serverDetails * config.ServerDetails , xrayVersion string , eventType , gitProvider , gitOwner , gitRepository , gitBranch , eventStatus , failureReason string ) error {
122- xscService , err := CreateXscServiceBackwardCompatible ( xrayVersion , serverDetails )
121+ func SendGitIntegrationEvent (serverDetails * config.ServerDetails , xrayVersion , projectKey , eventType , gitProvider , gitOwner , gitRepository , gitBranch , eventStatus , failureReason string ) error {
122+ xscService , err := CreateXscService ( serverDetails , xray . WithScopedProjectKey ( projectKey ) )
123123 if err != nil {
124- log .Debug (fmt .Sprintf ("failed to create xsc manager for analytics metrics service, error: %s " , err .Error ()))
125124 return err
126125 }
127126 gitIntegrationEvent := xscservices.GitIntegrationEvent {
@@ -133,11 +132,7 @@ func SendGitIntegrationEvent(serverDetails *config.ServerDetails, xrayVersion st
133132 EventStatus : eventStatus ,
134133 FailureReason : failureReason ,
135134 }
136- if err = xscService .SendGitIntegrationEvent (gitIntegrationEvent , xrayVersion ); err != nil {
137- log .Debug (fmt .Sprintf ("failed sending git integration event request to XSC service, error: %s " , err .Error ()))
138- return err
139- }
140- return nil
135+ return xscService .SendGitIntegrationEvent (gitIntegrationEvent , xrayVersion )
141136}
142137
143138func checkVersionForGitRepoKeyAnalytics (xrayVersion string ) bool {
0 commit comments