mirror of
https://github.com/trufflesecurity/trufflehog.git
synced 2024-11-10 07:04:24 +00:00
Move Github comments check to fix a test #1927
This commit is contained in:
parent
4b821e9732
commit
7ac7fa8728
1 changed files with 4 additions and 4 deletions
|
@ -1151,10 +1151,6 @@ type repoInfo struct {
|
|||
}
|
||||
|
||||
func (s *Source) processRepoComments(ctx context.Context, repoPath string, trimmedURL []string, repoURL *url.URL, chunksChan chan *sources.Chunk) error {
|
||||
if !(s.includeIssueComments || s.includePRComments) {
|
||||
return nil
|
||||
}
|
||||
|
||||
// Normal repository URL (https://github.com/<owner>/<repo>).
|
||||
if len(trimmedURL) < 3 {
|
||||
return fmt.Errorf("url missing owner and/or repo: '%s'", repoURL.String())
|
||||
|
@ -1162,6 +1158,10 @@ func (s *Source) processRepoComments(ctx context.Context, repoPath string, trimm
|
|||
owner := trimmedURL[1]
|
||||
repo := trimmedURL[2]
|
||||
|
||||
if !(s.includeIssueComments || s.includePRComments) {
|
||||
return nil
|
||||
}
|
||||
|
||||
repoInfo := repoInfo{
|
||||
owner: owner,
|
||||
repo: repo,
|
||||
|
|
Loading…
Reference in a new issue