Skip to content

Commit

Permalink
updating with exec block due to no gh token
Browse files Browse the repository at this point in the history
  • Loading branch information
joeleonjr committed Aug 1, 2024
1 parent 1970e86 commit 142fcf2
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pkg/sources/github/github.go
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,9 @@ func (s *Source) Init(aCtx context.Context, name string, jobID sources.JobID, so
if s.includeHiddenData && len(s.orgsCache.Keys()) > 0 {
return fmt.Errorf("cannot scan hidden data with organizations")
}
if s.includeHiddenData && s.conn.GetToken() == "" {
return fmt.Errorf("cannot scan hidden data without a token")
}

// Head or base should only be used with incoming webhooks
if (len(s.conn.Head) > 0 || len(s.conn.Base) > 0) && len(s.repos) != 1 {
Expand Down

0 comments on commit 142fcf2

Please sign in to comment.