MCPcopy
hub / github.com/apache/devlake / NotifyExternal

Function NotifyExternal

backend/server/services/pipeline.go:400–428  ·  view source on GitHub ↗

NotifyExternal FIXME ...

(pipelineId uint64)

Source from the content-addressed store, hash-verified

398
399// NotifyExternal FIXME ...
400func NotifyExternal(pipelineId uint64) errors.Error {
401 notification := GetPipelineNotificationService()
402 if notification == nil {
403 return nil
404 }
405 // send notification to an external web endpoint
406 pipeline, err := GetPipeline(pipelineId, true)
407 if err != nil {
408 return err
409 }
410 projectName, err := getProjectName(pipeline)
411 if err != nil {
412 return err
413 }
414 err = notification.PipelineStatusChanged(PipelineNotificationParam{
415 ProjectName: projectName,
416 PipelineID: pipeline.ID,
417 CreatedAt: pipeline.CreatedAt,
418 UpdatedAt: pipeline.UpdatedAt,
419 BeganAt: pipeline.BeganAt,
420 FinishedAt: pipeline.FinishedAt,
421 Status: pipeline.Status,
422 })
423 if err != nil {
424 globalPipelineLog.Error(err, "failed to send notification: %v", err)
425 return err
426 }
427 return nil
428}
429
430// CancelPipeline FIXME ...
431func CancelPipeline(pipelineId uint64) errors.Error {

Callers 3

RunPipelineInQueueFunction · 0.85
CreateDbPipelineFunction · 0.85
runPipelineFunction · 0.85

Calls 5

GetPipelineFunction · 0.85
getProjectNameFunction · 0.85
PipelineStatusChangedMethod · 0.65
ErrorMethod · 0.65

Tested by

no test coverage detected