NewClient creates a new Github Client. If the token is not empty, it will use it as the auth token to make calls.
(token string, opts ...ClientOption)
| 46 | } |
| 47 | |
| 48 | type GitClient interface { |
| 49 | GetTree(ctx context.Context, owner, repo, sha string, recursive bool) (*github.Tree, *github.Response, error) |
| 50 | GetBlobRaw(ctx context.Context, owner, repo, sha string) ([]byte, *github.Response, error) |
| 51 | } |
| 52 | |
| 53 | type IssuesClient interface { |
| 54 | Create(ctx context.Context, owner, repo string, issue *github.IssueRequest) (*github.Issue, *github.Response, error) |
| 55 | } |
| 56 | |
| 57 | type AppsClient interface { |
| 58 | ListRepos(ctx context.Context, opts *github.ListOptions) (*github.ListRepositories, *github.Response, error) |
| 59 | ListInstallations(ctx context.Context, opts *github.ListOptions) ([]*github.Installation, *github.Response, error) |
| 60 | } |
| 61 | |
| 62 | type UsersClient interface { |
| 63 | ListEmails(ctx context.Context, opts *github.ListOptions) ([]*github.UserEmail, *github.Response, error) |
| 64 | Get(ctx context.Context, user string) (*github.User, *github.Response, error) |
no outgoing calls