Skip to content

Commit e1b6b0a

Browse files
committed
after cr
1 parent bed6a3e commit e1b6b0a

File tree

1 file changed

+3
-8
lines changed

1 file changed

+3
-8
lines changed

utils/xsc/analyticsmetrics.go

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -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

143138
func checkVersionForGitRepoKeyAnalytics(xrayVersion string) bool {

0 commit comments

Comments
 (0)