Skip to content

Commit 3b174e3

Browse files
committed
check 'IsArchived'
1 parent 2ff2ec5 commit 3b174e3

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

services/actions/notifier_helper.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ func notify(ctx context.Context, input *notifyInput) error {
117117
log.Debug("ignore executing %v for event %v whose doer is %v", getMethod(ctx), input.Event, input.Doer.Name)
118118
return nil
119119
}
120-
if input.Repo.IsEmpty {
120+
if input.Repo.IsEmpty || input.Repo.IsArchived {
121121
return nil
122122
}
123123
if unit_model.TypeActions.UnitGlobalDisabled() {
@@ -501,7 +501,7 @@ func handleSchedules(
501501

502502
// DetectAndHandleSchedules detects the schedule workflows on the default branch and create schedule tasks
503503
func DetectAndHandleSchedules(ctx context.Context, repo *repo_model.Repository) error {
504-
if repo.IsEmpty {
504+
if repo.IsEmpty || repo.IsArchived {
505505
return nil
506506
}
507507

services/actions/schedule_tasks.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,11 @@ func startTasks(ctx context.Context) error {
6666
}
6767
}
6868

69+
if row.Repo.IsArchived {
70+
// Skip if the repo is archived
71+
continue
72+
}
73+
6974
cfg, err := row.Repo.GetUnit(ctx, unit.TypeActions)
7075
if err != nil {
7176
if repo_model.IsErrUnitTypeNotExist(err) {

0 commit comments

Comments
 (0)