Database governance built for humans and agents — controlling changes and access across every major database.
Go cicddata-governancedata-maskingdata-securitydatabase-accessdatabase-governancedevopsdevsecopsflywaygitopsliquibasemongodbmysqloraclepostgresqlschema-migrationssecuritysql-clientsqlservertidb
fix: filter the repo if the related project is archived (#3694)
ecmadao99db2b5046ea
diff --git a/server/webhook.go b/server/webhook.goindex f86545bbbb..3121b6f170 100644--- a/server/webhook.go+++ b/server/webhook.go@@ -160,13 +160,6 @@ func (s *Server) registerWebhookRoutes(g *echo.Group) {}filter := func(repo *api.Repository) (bool, error) {- if repo.Project.RowStatus == api.Archived {- log.Debug("Skip repository as the associated project is archived",- zap.Int("repository_id", repo.ID),- zap.String("repository_external_id", repo.ExternalID),- )- return false, nil- }if !repo.EnableSQLReviewCI {log.Debug("Skip repository as the SQL review CI is not enabled.",zap.Int("repository_id", repo.ID),@@ -408,6 +401,13 @@ func (s *Server) filterRepository(ctx context.Context, webhookEndpointID string,var filteredRepos []*api.Repositoryfor _, repo := range repos {+ if repo.Project.RowStatus == api.Archived {+ log.Debug("Skip repository as the associated project is archived",+ zap.Int("repository_id", repo.ID),+ zap.String("repository_external_id", repo.ExternalID),+ )+ continue+ }if repo.VCS == nil {log.Debug("Skipping repo due to missing VCS", zap.Int("repoID", repo.ID))continue