github

package
v0.0.0-...-7392cab Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 19, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetInstance

func GetInstance(ctx context.Context, token string) *github.Client

GetInstance retourne l'unique instance de GithubClient

Types

type EmailData

type EmailData struct {
	Email   string   `json:"email"`
	Commits []string `json:"commits"`
}

EmailData holds the email and associated commits

type RepoEmails

type RepoEmails struct {
	RepoName string                `json:"repo_name"`
	Emails   map[string]*EmailData `json:"emails"`
}

RepoEmails holds the email data for each repository

func ScanRepository

func ScanRepository(ctx context.Context, username string, repo *github.Repository, token string, excludeMails []string) (*RepoEmails, error)

ScanCommitsForEmails scans the commits of a repository to find associated emails

type RepoSummary

type RepoSummary struct {
	Total   int
	Public  int
	Private int
	Forks   int
}

RepoSummary holds a summary of the found repositories

func GetRepositories

func GetRepositories(ctx context.Context, username string, token string, includePublic bool, includePrivate bool, excludeForks bool) ([]*github.Repository, RepoSummary, error)

GetRepositories fetches the repositories of a GitHub user

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL