1
0
Fork 0
forked from forgejo/forgejo

Remove scheduled action tasks if the repo is archived (#30224) (#30230)

Backport #30224 by @Zettat123

Fix #30220

Co-authored-by: Zettat123 <zettat123@gmail.com>
(cherry picked from commit 895d2795abe79cc2e87b35d39cb7d09b9234b06d)
This commit is contained in:
Giteabot 2024-04-02 01:43:09 +08:00 committed by Earl Warren
parent 94fc99c217
commit b310027e55
No known key found for this signature in database
GPG key ID: 0579CB2928A78A00
4 changed files with 29 additions and 2 deletions

View file

@ -66,6 +66,11 @@ func startTasks(ctx context.Context) error {
}
}
if row.Repo.IsArchived {
// Skip if the repo is archived
continue
}
cfg, err := row.Repo.GetUnit(ctx, unit.TypeActions)
if err != nil {
if repo_model.IsErrUnitTypeNotExist(err) {