diff options
author | Lunny Xiao <xiaolunwen@gmail.com> | 2023-09-08 17:01:19 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-09-08 17:01:19 +0200 |
commit | 9c0a3532a4765263f279caeabd7f696372ce1d1f (patch) | |
tree | 4ed801ef304d923617af7733a6966f166bebc80e /services/actions | |
parent | Improve flex list UI (#26970) (diff) | |
download | forgejo-9c0a3532a4765263f279caeabd7f696372ce1d1f.tar.xz forgejo-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 'services/actions')
-rw-r--r-- | services/actions/schedule_tasks.go | 14 |
1 files changed, 1 insertions, 13 deletions
diff --git a/services/actions/schedule_tasks.go b/services/actions/schedule_tasks.go index 12227377ab..40b606c777 100644 --- a/services/actions/schedule_tasks.go +++ b/services/actions/schedule_tasks.go @@ -113,6 +113,7 @@ func CreateScheduleTask(ctx context.Context, cron *actions_model.ActionSchedule) CommitSHA: cron.CommitSHA, Event: cron.Event, EventPayload: cron.EventPayload, + ScheduleID: cron.ID, Status: actions_model.StatusWaiting, } @@ -127,19 +128,6 @@ func CreateScheduleTask(ctx context.Context, cron *actions_model.ActionSchedule) return err } - // Retrieve the jobs for the newly created action run - jobs, _, err := actions_model.FindRunJobs(ctx, actions_model.FindRunJobOptions{RunID: run.ID}) - if err != nil { - return err - } - - // Create commit statuses for each job - for _, job := range jobs { - if err := createCommitStatus(ctx, job); err != nil { - return err - } - } - // Return nil if no errors occurred return nil } |