From 1845e1b9f33e358f87680e4594bf7fc32c8824d9 Mon Sep 17 00:00:00 2001 From: Joey Wilhelm Date: Fri, 23 Jun 2023 11:18:37 -0600 Subject: [PATCH] fix: Ignore archived repositories from data collection --- api/github.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/api/github.go b/api/github.go index bd8bcda..460e602 100644 --- a/api/github.go +++ b/api/github.go @@ -62,7 +62,11 @@ func QueryGithubOrgVulnerabilities(ghOrgLogin string, ghClient githubv4.Client) if err != nil { log.Panic().Err(err).Msg("Failed to query GitHub!") } - allRepos = append(allRepos, alertQuery.Organization.Repositories.Nodes...) + for _, node := range alertQuery.Organization.Repositories.Nodes { + if !node.IsArchived { + allRepos = append(allRepos, node) + } + } if !alertQuery.Organization.Repositories.PageInfo.HasNextPage { break }