mirror of
https://github.com/go-gitea/gitea.git
synced 2025-10-30 20:34:26 +01:00
fix lint
This commit is contained in:
parent
d404c60b73
commit
0940208a00
@ -461,7 +461,9 @@ func rerunJob(ctx *context_module.Context, job *actions_model.ActionRunJob, shou
|
|||||||
actions_service.CreateCommitStatus(ctx, job)
|
actions_service.CreateCommitStatus(ctx, job)
|
||||||
// Sync run status with db
|
// Sync run status with db
|
||||||
job.Run = nil
|
job.Run = nil
|
||||||
_ = job.LoadAttributes(ctx)
|
if err := job.LoadAttributes(ctx); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
notify_service.WorkflowRunStatusUpdate(ctx, job.Run.Repo, job.Run.TriggerUser, job.Run)
|
notify_service.WorkflowRunStatusUpdate(ctx, job.Run.Repo, job.Run.TriggerUser, job.Run)
|
||||||
notify_service.WorkflowJobStatusUpdate(ctx, job.Run.Repo, job.Run.TriggerUser, job, nil)
|
notify_service.WorkflowJobStatusUpdate(ctx, job.Run.Repo, job.Run.TriggerUser, job, nil)
|
||||||
|
|
||||||
@ -568,7 +570,10 @@ func Cancel(ctx *context_module.Context) {
|
|||||||
job := updatedjobs[0]
|
job := updatedjobs[0]
|
||||||
// Sync run status with db
|
// Sync run status with db
|
||||||
job.Run = nil
|
job.Run = nil
|
||||||
job.LoadAttributes(ctx)
|
if err := job.LoadAttributes(ctx); err != nil {
|
||||||
|
ctx.HTTPError(http.StatusInternalServerError, err.Error())
|
||||||
|
return
|
||||||
|
}
|
||||||
notify_service.WorkflowRunStatusUpdate(ctx, job.Run.Repo, job.Run.TriggerUser, job.Run)
|
notify_service.WorkflowRunStatusUpdate(ctx, job.Run.Repo, job.Run.TriggerUser, job.Run)
|
||||||
}
|
}
|
||||||
ctx.JSON(http.StatusOK, struct{}{})
|
ctx.JSON(http.StatusOK, struct{}{})
|
||||||
|
|||||||
@ -89,7 +89,9 @@ func checkJobsOfRun(ctx context.Context, runID int64) error {
|
|||||||
if runUpdated {
|
if runUpdated {
|
||||||
// Sync run status with db
|
// Sync run status with db
|
||||||
jobs[0].Run = nil
|
jobs[0].Run = nil
|
||||||
jobs[0].LoadAttributes(ctx)
|
if err := jobs[0].LoadAttributes(ctx); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
run := jobs[0].Run
|
run := jobs[0].Run
|
||||||
notify_service.WorkflowRunStatusUpdate(ctx, run.Repo, run.TriggerUser, run)
|
notify_service.WorkflowRunStatusUpdate(ctx, run.Repo, run.TriggerUser, run)
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user