mirror of
				https://gitee.com/gitea/gitea
				synced 2025-11-04 08:30:25 +08:00 
			
		
		
		
	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">
This commit is contained in:
		@@ -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
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user