aboutsummaryrefslogtreecommitdiffstats
path: root/routers
diff options
context:
space:
mode:
authorLunny Xiao <xiaolunwen@gmail.com>2023-09-08 23:01:19 +0800
committerGitHub <noreply@github.com>2023-09-08 23:01:19 +0800
commit9c0a3532a4765263f279caeabd7f696372ce1d1f (patch)
tree4ed801ef304d923617af7733a6966f166bebc80e /routers
parentffa4949eaaf645995c5a20cd302d0256417b97ed (diff)
downloadgitea-9c0a3532a4765263f279caeabd7f696372ce1d1f.tar.gz
gitea-9c0a3532a4765263f279caeabd7f696372ce1d1f.zip
Add a new column schedule_id for action_run to track (#26975)
Fix #26971 And the UI now will display it's scheduled but not triggered by a push. <img width="954" alt="图片" src="https://github.com/go-gitea/gitea/assets/81045/d211845c-457e-4c3e-af1f-a0d654d3f365">
Diffstat (limited to 'routers')
-rw-r--r--routers/api/actions/runner/runner.go8
1 files changed, 7 insertions, 1 deletions
diff --git a/routers/api/actions/runner/runner.go b/routers/api/actions/runner/runner.go
index 6de5964cb7..cb206f5685 100644
--- a/routers/api/actions/runner/runner.go
+++ b/routers/api/actions/runner/runner.go
@@ -202,8 +202,14 @@ func (s *Service) UpdateTask(
if err := task.LoadJob(ctx); err != nil {
return nil, status.Errorf(codes.Internal, "load job: %v", err)
}
+ if err := task.Job.LoadRun(ctx); err != nil {
+ return nil, status.Errorf(codes.Internal, "load run: %v", err)
+ }
- actions_service.CreateCommitStatus(ctx, task.Job)
+ // don't create commit status for cron job
+ if task.Job.Run.ScheduleID == 0 {
+ actions_service.CreateCommitStatus(ctx, task.Job)
+ }
if req.Msg.State.Result != runnerv1.Result_RESULT_UNSPECIFIED {
if err := actions_service.EmitJobsIfReady(task.Job.RunID); err != nil {