Documentation
¶
Index ¶
- func CheckDeleteRepoPermissions(ctx context.Context, client *github.Client) (bool, error)
- func DisplayRateLimit(ctx context.Context, client *github.Client)
- func ExtractLinks(text string) []string
- func FetchCommits(ctx context.Context, client *github.Client, owner, repo string, isFork bool, ...) ([]models.CommitInfo, error)
- func FetchExternalContributions(ctx context.Context, pool *ClientPool, username string, checkSecrets bool, ...) (map[string]*models.EmailDetails, error)
- func FetchGists(ctx context.Context, client *github.Client, username string, cfg *Config) ([]*github.Gist, error)
- func FetchOrgRepos(ctx context.Context, client *github.Client, orgName string, cfg *Config) ([]*github.Repository, error)
- func FetchRepos(ctx context.Context, client *github.Client, username string, cfg *Config) ([]*github.Repository, error)
- func FetchReposWithUser(ctx context.Context, client *github.Client, username string, cfg *Config, ...) ([]*github.Repository, error)
- func GetGithubClient(token string) *github.Client
- func GetToken(c *cli.Context) string
- func GetUserByEmail(ctx context.Context, client *github.Client, email string) (*github.User, error)
- func GetUsernameForEmail(ctx context.Context, client *github.Client, email string) (string, error)
- func GetUsernameFromEmailSpoof(ctx context.Context, client *github.Client, email string, token string) (string, error)
- func IsOrganization(ctx context.Context, client *github.Client, name string) (bool, error)
- func IsValidEmail(input string) bool
- func ProcessCommit(commit *gh.RepositoryCommit, checkSecrets bool, cfg *Config) models.CommitInfo
- func ProcessGists(ctx context.Context, pool *ClientPool, gists []*gh.Gist, checkSecrets bool, ...) map[string]*models.EmailDetails
- func ProcessRepos(ctx context.Context, pool *ClientPool, repos []*gh.Repository, ...) map[string]*models.EmailDetails
- func ProcessReposLimited(ctx context.Context, pool *ClientPool, repos []*gh.Repository, ...) map[string]*models.EmailDetails
- func ProcessReposStreaming(ctx context.Context, pool *ClientPool, repos []*gh.Repository, ...) map[string]*models.EmailDetails
- func ProcessUserEvents(ctx context.Context, pool *ClientPool, username string, checkSecrets bool, ...) map[string]*models.EmailDetails
- func RateLimitedProcessRepos(ctx context.Context, pool *ClientPool, repos []*gh.Repository, ...) map[string]*models.EmailDetails
- func ReadProxyFile(path string) ([]string, error)
- func ReadTokenFile(path string) ([]string, error)
- func UserExists(ctx context.Context, client *github.Client, username string) (bool, error)
- func ValidateToken(ctx context.Context, client *github.Client) error
- type ClientPool
- type Config
- type EmailUpdate
- type ExternalCommit
- type ManagedClient
- type RateLimit
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExtractLinks ¶
func FetchCommits ¶
func FetchExternalContributions ¶
func FetchExternalContributions(ctx context.Context, pool *ClientPool, username string, checkSecrets bool, cfg *Config) (map[string]*models.EmailDetails, error)
func FetchGists ¶
func FetchGists(ctx context.Context, client *github.Client, username string, cfg *Config) ([]*github.Gist, error)
FetchGists retrieves all public gists for a given username
func FetchOrgRepos ¶
func FetchOrgRepos(ctx context.Context, client *github.Client, orgName string, cfg *Config) ([]*github.Repository, error)
based: unified repo fetching for orgs
func FetchRepos ¶
func FetchReposWithUser ¶
func GetGithubClient ¶
func GetUserByEmail ¶
func GetUsernameForEmail ¶
func IsOrganization ¶
IsOrganization checks if the given name belongs to a GitHub organization
func IsValidEmail ¶
func ProcessCommit ¶
func ProcessCommit(commit *gh.RepositoryCommit, checkSecrets bool, cfg *Config) models.CommitInfo
func ProcessGists ¶
func ProcessGists(ctx context.Context, pool *ClientPool, gists []*gh.Gist, checkSecrets bool, cfg *Config) map[string]*models.EmailDetails
func ProcessRepos ¶
func ProcessRepos(ctx context.Context, pool *ClientPool, repos []*gh.Repository, checkSecrets bool, cfg *Config, targetUserIdentifiers map[string]bool, showTargetOnly bool) map[string]*models.EmailDetails
func ProcessReposLimited ¶
func ProcessReposLimited(ctx context.Context, pool *ClientPool, repos []*gh.Repository, checkSecrets bool, cfg *Config, targetUserIdentifiers map[string]bool, showTargetOnly bool) map[string]*models.EmailDetails
func ProcessReposStreaming ¶
func ProcessReposStreaming(ctx context.Context, pool *ClientPool, repos []*gh.Repository, checkSecrets bool, cfg *Config, targetUserIdentifiers map[string]bool, showTargetOnly bool, updateChan chan<- EmailUpdate) map[string]*models.EmailDetails
func ProcessUserEvents ¶
func RateLimitedProcessRepos ¶
func RateLimitedProcessRepos(ctx context.Context, pool *ClientPool, repos []*gh.Repository, checkSecrets bool, cfg *Config, targetUserIdentifiers map[string]bool, showTargetOnly bool, updateChan chan<- EmailUpdate) map[string]*models.EmailDetails
func ReadProxyFile ¶
func ReadTokenFile ¶
func UserExists ¶
Types ¶
type ClientPool ¶
type ClientPool struct {
// contains filtered or unexported fields
}
func NewClientPool ¶
func NewClientPool(tokens []string, proxies []string) (*ClientPool, error)
func (*ClientPool) AllClients ¶
func (p *ClientPool) AllClients() []*ManagedClient
func (*ClientPool) DisplayPoolRateLimit ¶
func (p *ClientPool) DisplayPoolRateLimit(ctx context.Context)
func (*ClientPool) GetClient ¶
func (p *ClientPool) GetClient() *ManagedClient
func (*ClientPool) PrimaryToken ¶
func (p *ClientPool) PrimaryToken() string
func (*ClientPool) Size ¶
func (p *ClientPool) Size() int
type Config ¶
type Config struct {
MaxRepos int
MaxGists int
MaxCommits int
ShowInteresting bool
MaxConcurrentRequests int
PerPage int
SkipNodeModules bool
QuickMode bool
TimestampAnalysis bool
IncludeForks bool
}
Config holds configuration for GitHub operations
type EmailUpdate ¶
type EmailUpdate struct {
Email string
Details *models.EmailDetails
RepoName string
}
type ExternalCommit ¶
type ExternalCommit struct {
Email string
Name string
Repository string
CommitInfo models.CommitInfo
}
type ManagedClient ¶
type ManagedClient struct {
Client *gh.Client
Token string
Proxy string
// contains filtered or unexported fields
}
func (*ManagedClient) Remaining ¶
func (mc *ManagedClient) Remaining() int
func (*ManagedClient) ResetAt ¶
func (mc *ManagedClient) ResetAt() time.Time
func (*ManagedClient) UpdateRateLimit ¶
func (mc *ManagedClient) UpdateRateLimit(remaining int, resetAt time.Time)
Click to show internal directories.
Click to hide internal directories.