forgejo/routers/web/repo
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
..
actions remove util.OptionalBool and related functions (#29513) 2024-03-06 12:10:46 +08:00
badges Fix repo badges when the label or text contains dashes 2024-03-20 22:41:20 +01:00
flags Move context from modules to services (#29440) 2024-03-06 12:10:43 +08:00
setting Fix schedule tasks bugs (#28691) 2024-03-25 16:25:02 +01:00
activity.go Move context from modules to services (#29440) 2024-03-06 12:10:43 +08:00
attachment.go Move context from modules to services (#29440) 2024-03-06 12:10:43 +08:00
blame.go Move context from modules to services (#29440) 2024-03-06 12:10:43 +08:00
branch.go Use repo object format name instead of detecting from git repository (#29702) 2024-03-20 08:46:28 +01:00
cherry_pick.go Move context from modules to services (#29440) 2024-03-06 12:10:43 +08:00
code_frequency.go Move context from modules to services (#29440) 2024-03-06 12:10:43 +08:00
commit.go Unify search boxes (#29530) 2024-03-20 12:31:05 +00:00
compare.go Move context from modules to services (#29440) 2024-03-06 12:10:43 +08:00
contributors.go Move context from modules to services (#29440) 2024-03-06 12:10:43 +08:00
download.go Move context from modules to services (#29440) 2024-03-06 12:10:43 +08:00
editor.go Make PR form use toast to show error message (#29545) 2024-03-06 12:10:46 +08:00
editor_test.go Move context from modules to services (#29440) 2024-03-06 12:10:43 +08:00
find.go Move context from modules to services (#29440) 2024-03-06 12:10:43 +08:00
githttp.go Move context from modules to services (#29440) 2024-03-06 12:10:43 +08:00
githttp_test.go Fix http protocol auth (#27875) 2023-11-02 22:14:33 +08:00
helper.go Move context from modules to services (#29440) 2024-03-06 12:10:43 +08:00
helper_test.go Make web context initialize correctly for different cases (#26726) 2023-08-25 19:07:42 +08:00
issue.go Refactor to use optional.Option for issue index search option (#29739) 2024-03-20 08:46:28 +01:00
issue_content_history.go Move context from modules to services (#29440) 2024-03-06 12:10:43 +08:00
issue_dependency.go Move context from modules to services (#29440) 2024-03-06 12:10:43 +08:00
issue_label.go Move context from modules to services (#29440) 2024-03-06 12:10:43 +08:00
issue_label_test.go Move context from modules to services (#29440) 2024-03-06 12:10:43 +08:00
issue_lock.go Move context from modules to services (#29440) 2024-03-06 12:10:43 +08:00
issue_pin.go Move context from modules to services (#29440) 2024-03-06 12:10:43 +08:00
issue_stopwatch.go Move context from modules to services (#29440) 2024-03-06 12:10:43 +08:00
issue_test.go Implement FSFE REUSE for golang files (#21840) 2022-11-27 18:20:29 +00:00
issue_timetrack.go Move context from modules to services (#29440) 2024-03-06 12:10:43 +08:00
issue_watch.go Move context from modules to services (#29440) 2024-03-06 12:10:43 +08:00
main_test.go make writing main test easier (#27270) 2023-09-28 01:38:53 +00:00
middlewares.go Move context from modules to services (#29440) 2024-03-06 12:10:43 +08:00
migrate.go Move context from modules to services (#29440) 2024-03-06 12:10:43 +08:00
milestone.go remove util.OptionalBool and related functions (#29513) 2024-03-06 12:10:46 +08:00
packages.go remove util.OptionalBool and related functions (#29513) 2024-03-06 12:10:46 +08:00
patch.go Move context from modules to services (#29440) 2024-03-06 12:10:43 +08:00
projects.go remove util.OptionalBool and related functions (#29513) 2024-03-06 12:10:46 +08:00
projects_test.go Move context from modules to services (#29440) 2024-03-06 12:10:43 +08:00
pull.go fix #2501 2024-03-14 12:34:41 +00:00
pull_review.go Move context from modules to services (#29440) 2024-03-06 12:10:43 +08:00
pull_review_test.go Move context from modules to services (#29440) 2024-03-06 12:10:43 +08:00
recent_commits.go Move context from modules to services (#29440) 2024-03-06 12:10:43 +08:00
release.go Refactor some Str2html code (#29397) 2024-03-06 12:10:44 +08:00
release_test.go Move context from modules to services (#29440) 2024-03-06 12:10:43 +08:00
render.go Move context from modules to services (#29440) 2024-03-06 12:10:43 +08:00
repo.go Some performance optimization on dashboard and issues page (#29010) 2024-03-20 08:46:28 +01:00
search.go simplify template 2024-03-20 12:31:36 +00:00
topic.go Move context from modules to services (#29440) 2024-03-06 12:10:43 +08:00
treelist.go Move context from modules to services (#29440) 2024-03-06 12:10:43 +08:00
view.go Customizable "Open with" applications for repository clone (#29320) 2024-03-23 11:58:54 +01:00
view_test.go Implement FSFE REUSE for golang files (#21840) 2022-11-27 18:20:29 +00:00
wiki.go Move context from modules to services (#29440) 2024-03-06 12:10:43 +08:00
wiki_test.go Make "/user/login" page redirect if the current user has signed in (#29583) 2024-03-11 23:36:58 +07:00