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

Backport #30224 by @Zettat123

Fix #30220

Co-authored-by: Zettat123 <zettat123@gmail.com>
This commit is contained in:
Giteabot
2024-04-02 01:43:09 +08:00
committed by GitHub
parent f3f0081759
commit 895d2795ab
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) {