Skip to content

Commit

Permalink
Merge pull request #66 from underdog-tech/fix/ignore-archived-repos
Browse files Browse the repository at this point in the history
fix: Ignore archived repositories from data collection
  • Loading branch information
tarkatronic authored Jun 23, 2023
2 parents af5ceee + 1845e1b commit 9fd00e9
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion api/github.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down

0 comments on commit 9fd00e9

Please sign in to comment.