Commit graph

18143 commits

Author SHA1 Message Date
Earl Warren
a117dfd2b1
[ACTIONS] port scheduled actions from Gitea
Refs: https://codeberg.org/forgejo/forgejo/issues/2798
2024-03-26 16:51:56 +01:00
Earl Warren
52e9d2db06
[DEADCODE] update 2024-03-26 16:51:56 +01:00
Jason Song
547d32c492
Cancel previous runs of the same PR automatically (#29961)
Follow #25716. Also cancel previous runs for `pull_request_sync`.

It's not a bug since it original PR said "if the event is push".

The main change is
https://github.com/go-gitea/gitea/pull/29961/files#diff-08adda3f8ae0360937f46abb1f4418603bd3518522baa356be11c6c7ac4abcc3.

And also rename `CancelRunningJobs` to `CancelPreviousJobs` to make it
more clear.

(cherry picked from commit b150ff0bab3fc6c419edf1569a0271ebcb9734fa)
2024-03-26 16:51:56 +01:00
yp05327
869286595f
Add empty repo check in DetectAndHandleSchedules (#29606)
![image](https://github.com/go-gitea/gitea/assets/18380374/e6081301-bd3e-4cf6-ba4e-e574348dffb4)

(cherry picked from commit 3f3335ae51d89520acce6573e870590423248c5c)
2024-03-26 16:51:56 +01:00
Zettat123
07eeab863b
Only delete scheduled workflows when needed (#29091)
Fix #29040

`handleSchedules` should be called only if `DetectWorkflows` should
detect schedule workflows

(cherry picked from commit e600c35f066c79b717dc0c416b07d5c34502d286)
2024-03-25 16:28:18 +01:00
Zettat123
cf78141bdd
Fix an actions schedule bug (#28942)
In #28691, schedule plans will be deleted when a repo's actions unit is
disabled. But when the unit is enabled, the schedule plans won't be
created again.

This PR fixes the bug. The schedule plans will be created again when the
actions unit is re-enabled

(cherry picked from commit adc3598a75)
2024-03-25 16:27:32 +01:00
Lunny Xiao
3d19921dbe
Fix schedule not trigger bug because matching full ref name with short ref name (#28874)
Fix #28533

Caused by #28691

(cherry picked from commit 23efd9d278)
2024-03-25 16:27:00 +01:00
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
Earl Warren
623c79dfd2
Revert "[ACTIONS] on.schedule: the event is always "schedule""
This reverts commit 403bb4bf48.
2024-03-25 16:07:17 +01:00
Earl Warren
23f68cad7e Merge pull request 'Update gitea.com/go-chi/captcha digest to fb487f6' (#2778) from renovate/gitea.com-go-chi-captcha-digest into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/2778
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-03-25 14:48:29 +00:00
Earl Warren
9e72beae0b Merge pull request 'Update renovate config' (#2789) from viceice/forgejo:chore/renovate-1 into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/2789
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-03-25 13:54:43 +00:00
Michael Kriese
b561c02b56
Update renovate config 2024-03-25 14:52:42 +01:00
Renovate Bot
46aaecc2b8 Update gitea.com/go-chi/captcha digest to fb487f6 2024-03-25 13:37:57 +00:00
Earl Warren
60a01255e7 Merge pull request 'Disable renovate digist pinning' (#2787) from viceice/forgejo:chore/renovate into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/2787
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-03-25 13:15:23 +00:00
Michael Kriese
477832f4a2
Disable renovate digist pinning 2024-03-25 14:12:49 +01:00
Earl Warren
9e77bf310c Merge pull request 'Update renovate config' (#2784) from viceice/forgejo:chore/renovate into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/2784
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-03-25 13:03:46 +00:00
Michael Kriese
8f1c26aa54
Update renovate config 2024-03-25 13:58:51 +01:00
Earl Warren
674a711127 Merge pull request 'Update renovate config' (#2783) from viceice/forgejo:chore/renovate into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/2783
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-03-25 12:34:51 +00:00
Michael Kriese
0023f78a17
Disable duplicate builds 2024-03-25 13:24:53 +01:00
Michael Kriese
a32772e695
Update renovate config 2024-03-25 13:16:16 +01:00
Earl Warren
eb3ea82ee6 Merge pull request 'Update renovate configs' (#2780) from viceice/forgejo:chore/renovate into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/2780
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-03-25 12:05:14 +00:00
Michael Kriese
102531cba1
Update renovate configs 2024-03-25 13:03:20 +01:00
Earl Warren
7288fb5dff Merge pull request 'Add renovate' (#2775) from viceice/forgejo:chore/renovate into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/2775
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-03-25 11:22:03 +00:00
Earl Warren
9397bfd276 Merge pull request 'Offer to remove WIP: prefix in sidebar' (#2660) from 0ko/forgejo:convert-to-normal into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/2660
Reviewed-by: oliverpool <oliverpool@noreply.codeberg.org>
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-03-25 10:30:11 +00:00
Earl Warren
1e16f3d7d1 Merge pull request 'go: upgrade to go v1.22' (#2770) from earl-warren/forgejo:wip-go-1.22 into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/2770
Reviewed-by: oliverpool <oliverpool@noreply.codeberg.org>
2024-03-25 10:27:04 +00:00
Michael Kriese
8ce7de5677
Add renovate 2024-03-25 10:34:01 +01:00
Earl Warren
84f28f36b0
go: upgrade to go v1.22 2024-03-25 06:52:23 +01:00
Gusted
9f088464ea Merge pull request 'Fix typo in translation' (#2768) from forgejo-tr-typo into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/2768
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-03-24 22:02:44 +00:00
Gusted
efc79dd41e Fix typo in translation
Regression of 4c1af0d9a6
2024-03-24 21:30:08 +00:00
Gusted
142459bbe0
[BUG] Use new translation key
- Caused by 847f03b6a6
- Resolve CI failures on `forgejo` branch.
2024-03-24 09:16:30 +01:00
Earl Warren
5a18b74632 Merge pull request '[TESTS] fail when log.Error is called' (#2657) from oliverpool/forgejo:fail_test_on_log_error into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/2657
2024-03-24 07:28:31 +00:00
Earl Warren
7e8e27b8ef Merge pull request '[CI] backport: do no nothing if there are no backport labels' (#2757) from earl-warren/forgejo:wip-ci-backport into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/2757
Reviewed-by: oliverpool <oliverpool@noreply.codeberg.org>
2024-03-24 07:25:59 +00:00
Earl Warren
f326f14da7
[CI] backport: do no nothing if there are no backport labels 2024-03-24 07:52:00 +01:00
oliverpool
2d209f1130 drop log.Error in ReadRepoNotifications 2024-03-24 07:12:31 +01:00
oliverpool
c0fb62cb5a fix action fixtures 2024-03-24 07:12:31 +01:00
oliverpool
25daa267bb migration v1_11/v111.go: Unknown columns in 'field list' 2024-03-24 07:12:31 +01:00
oliverpool
639ac7a131 workergroup: gracefully exit on close(popItemErr) 2024-03-24 07:12:31 +01:00
oliverpool
fb6bcf1029 packages/maven: log.Warn on bad request 2024-03-24 07:12:31 +01:00
oliverpool
dda88488ca packages: skip error logging on duplicate 2024-03-24 07:12:31 +01:00
oliverpool
7b576d0a5d activitypub: warn instead of error 2024-03-24 07:12:31 +01:00
oliverpool
e7abda6a0d actions artifacts: warn instead of error on invalid request 2024-03-24 07:12:31 +01:00
oliverpool
a0d1cfdf7d fix missing admin.config.allow_dots_in_usernames translation 2024-03-24 07:12:30 +01:00
oliverpool
b990e07af0 old migrations: warning instead of error 2024-03-24 07:11:19 +01:00
oliverpool
3b7b899afa fix commit_status 2024-03-24 07:11:19 +01:00
oliverpool
2536c2db89 fix webhook fixtures 2024-03-24 07:11:19 +01:00
oliverpool
8750a5a42b fix TestBranchActions error log 2024-03-24 07:11:18 +01:00
oliverpool
036b98884c fix action_run fixtures 2024-03-24 07:11:18 +01:00
oliverpool
ca209a04b1 log.Error on missing translation 2024-03-24 07:11:18 +01:00
oliverpool
e43c6cd9df fail test when log.Error is called
except for some specific messages (to make the test pass for now)
2024-03-24 07:11:18 +01:00
Earl Warren
0bfd4ca532 Merge pull request 'Allow users to hide all "Add more units..." hints' (#2533) from algernon/forgejo:less-is-more into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/2533
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-03-24 05:42:37 +00:00