INNER CODE UNIT · Go

sendNotification

umputun/ralphex · cmd/ralphex/main.go:489

func sendNotification(req executePlanRequest, branch, elapsed string, stats git.DiffStats, runErr error) {
	req.NotifySvc.Send(context.Background(), buildNotifyResult(req, branch, elapsed, stats, runErr))
}

// buildNotifyResult constructs a notify.Result from execution parameters.
func buildNotifyResult(req executePlanRequest, branch, elapsed string, stats git.DiffStats, runErr error) notify.Result {
	result := notify.Result{
		Mode:     string(req.Mode),
		PlanFile: req.PlanFile,
		Branch:   branch,
		Duration: elapsed,
	}
	if runErr != nil {
		result.Status = "failure"
		result.Error = runErr.Error()
	} else {
		result.Status = "success"
		result.Files = stats.Files

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…