From 32f286e1ed5ecce82ebc8fbbca292e086227329e Mon Sep 17 00:00:00 2001 From: Brad Rydzewski Date: Tue, 10 Mar 2020 13:30:30 -0700 Subject: [PATCH] skip inactive cron repos --- trigger/cron/cron.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/trigger/cron/cron.go b/trigger/cron/cron.go index 9a4effd55..f5d7d2ed6 100644 --- a/trigger/cron/cron.go +++ b/trigger/cron/cron.go @@ -131,6 +131,11 @@ func (s *Scheduler) run(ctx context.Context) error { continue } + if repo.Active == false { + logger.Traceln("cron: skip inactive repository") + continue + } + // TODO(bradrydzewski) we may actually need to query the branch // first to get the sha, and then query the commit. This works fine // with github and gitlab, but may not work with other providers.