forked from kevadesu/forgejo
Remove scheduled action tasks if the repo is archived (#30224)
Fix #30220 (cherry picked from commit 1ef2eb50d82d07b1e4ff312ef58953d1bba2437a)
This commit is contained in:
parent
9214824510
commit
87870ade49
4 changed files with 29 additions and 2 deletions
|
@ -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) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue