Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetAllReposForUser ¶
func GetAllReposForUser(client *gh.Client) ([]*gh.Repository, error)
func PrintGists ¶
func PrintGitHubRepos ¶
func PrintGitHubRepos(repos []*gh.Repository)
Types ¶
type Permission ¶
type Permission int
type SecretInfo ¶
type SecretInfo struct { Metadata *TokenMetadata Repos []*gh.Repository Gists []*gh.Gist // AccessibleRepos, RepoAccessMap, and UserAccessMap are only set if // the token has fine-grained access. AccessibleRepos []*gh.Repository RepoAccessMap any UserAccessMap any }
type TokenMetadata ¶
type TokenMetadata struct { Type TokenType FineGrained bool User *gh.User Expiration time.Time OauthScopes []analyzers.Permission }
func GetTokenMetadata ¶
func GetTokenMetadata(token string, client *gh.Client) (*TokenMetadata, error)
GetTokenMetadata gets the username, expiration date, and x-oauth-scopes headers for a given token by sending a GET request to the /user endpoint Returns a response object for usage in the checkFineGrained function
Click to show internal directories.
Click to hide internal directories.