Documentation
¶
Overview ¶
Package github provides GitHub App authentication and API access.
Index ¶
- type AppClient
- type Manager
- type OrgClient
- type Searcher
- func (s *Searcher) ListAuthoredPRs(ctx context.Context, org, githubUsername string) ([]bot.PRSearchResult, error)
- func (s *Searcher) ListClosedPRs(ctx context.Context, org string, closedWithinHours int) ([]bot.PRSearchResult, error)
- func (s *Searcher) ListOpenPRs(ctx context.Context, org string, updatedWithinHours int) ([]bot.PRSearchResult, error)
- func (s *Searcher) ListReviewRequestedPRs(ctx context.Context, org, githubUsername string) ([]bot.PRSearchResult, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AppClient ¶
type AppClient struct {
// contains filtered or unexported fields
}
AppClient manages GitHub App authentication.
func NewAppClient ¶
NewAppClient creates a new GitHub App client.
func (*AppClient) ClientForOrg ¶
ClientForOrg returns an authenticated GitHub client for an organization.
func (*AppClient) HTTPClient ¶
HTTPClient returns an authenticated HTTP client for an organization.
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
Manager manages GitHub App installations across multiple orgs.
func NewManager ¶
func NewManager(ctx context.Context, appClient *AppClient, allowPersonalAccounts bool) (*Manager, error)
NewManager creates a new GitHub installation manager.
func (*Manager) ClientForOrg ¶
ClientForOrg returns the client for an org.
type OrgClient ¶
type OrgClient struct {
// contains filtered or unexported fields
}
OrgClient wraps a GitHub client for an org with additional functionality.
func (*OrgClient) InstallationToken ¶
InstallationToken returns a fresh installation token.
type Searcher ¶
type Searcher struct {
// contains filtered or unexported fields
}
Searcher queries GitHub for PRs using the search API.
func NewSearcher ¶
NewSearcher creates a new PR searcher.
func (*Searcher) ListAuthoredPRs ¶
func (s *Searcher) ListAuthoredPRs(ctx context.Context, org, githubUsername string) ([]bot.PRSearchResult, error)
ListAuthoredPRs returns open PRs authored by a specific user.
func (*Searcher) ListClosedPRs ¶
func (s *Searcher) ListClosedPRs(ctx context.Context, org string, closedWithinHours int) ([]bot.PRSearchResult, error)
ListClosedPRs returns recently closed/merged PRs for catching terminal states.
func (*Searcher) ListOpenPRs ¶
func (s *Searcher) ListOpenPRs(ctx context.Context, org string, updatedWithinHours int) ([]bot.PRSearchResult, error)
ListOpenPRs returns open PRs for an org updated within the given hours.
func (*Searcher) ListReviewRequestedPRs ¶
func (s *Searcher) ListReviewRequestedPRs(ctx context.Context, org, githubUsername string) ([]bot.PRSearchResult, error)
ListReviewRequestedPRs returns open PRs where a specific user is requested to review.