mirror of
https://github.com/gitleaks/gitleaks.git
synced 2026-11-29 12:44:22 +01:00
exclude-forks gitlab and github
This commit is contained in:
1 parent
b47e00858e
commit
1afa931248
4 files changed
+22
-5
No files matched your search
+9
-1
@@ -72,7 +72,15 @@ func (g *Github) Audit() {
|
||||
_githubRepos, resp, err = g.client.Repositories.ListByOrg(ctx, g.manager.Opts.Organization,
|
||||
&github.RepositoryListByOrgOptions{ListOptions: listOptions})
|
||||
}
|
||||
githubRepos = append(githubRepos, _githubRepos...)
|
||||
|
||||
for _, r := range _githubRepos {
|
||||
if g.manager.Opts.ExcludeForks && r.GetFork() {
|
||||
log.Debugf("excluding forked repo: %s", *r.Name)
|
||||
continue
|
||||
}
|
||||
githubRepos = append(githubRepos, r)
|
||||
}
|
||||
|
||||
|
||||
if resp == nil {
|
||||
break
|
||||
|
||||
Reference in new issue
Block a user