forgejo/models/actions
Lunny Xiao 3b3747ffe8
Fix schedule tasks bugs (#28691)
Fix #28157

This PR fix the possible bugs about actions schedule.

- Move `UpdateRepositoryUnit` and `SetRepoDefaultBranch` from models to
service layer
- Remove schedules plan from database and cancel waiting & running
schedules tasks in this repository when actions unit has been disabled
or global disabled.
- Remove schedules plan from database and cancel waiting & running
schedules tasks in this repository when default branch changed.

(cherry picked from commit 97292da960)

Conflicts:
	modules/actions/github.go
	routers/web/repo/setting/default_branch.go
	routers/web/repo/setting/setting.go
	services/repository/branch.go
	services/repository/setting.go
	tests/integration/actions_trigger_test.go
2024-03-25 16:25:02 +01:00
..
artifact.go Artifact deletion in actions ui (#27172) 2024-02-23 09:06:14 +01:00
forgejo.go
forgejo_test.go
main_test.go
run.go Fix schedule tasks bugs (#28691) 2024-03-25 16:25:02 +01:00
run_job.go
run_job_list.go
run_list.go Fix schedule tasks bugs (#28691) 2024-03-25 16:25:02 +01:00
runner.go remove util.OptionalBool and related functions (#29513) 2024-03-06 12:10:46 +08:00
runner_list.go
runner_token.go
runner_token_test.go
schedule.go Fix schedule tasks bugs (#28691) 2024-03-25 16:25:02 +01:00
schedule_list.go
schedule_spec.go
schedule_spec_list.go
status.go
task.go
task_list.go
task_output.go
task_step.go
tasks_version.go
utils.go
utils_test.go
variable.go Make runs-on support variable expression (#29468) 2024-03-11 23:36:59 +07:00