{"modulePath":"github.com/codeGROOVE-dev/discordian","version":"v0.0.0-20260118132946-229e418fa812","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package github\n\nPackage github provides GitHub App authentication and API access.\n\n## Types\n\n```go\ntype AppClient struct {\n\t// contains filtered or unexported fields\n}\n```\nAppClient manages GitHub App authentication.\n\n```go\nfunc NewAppClient(appID, privateKeyPEM string, logger *slog.Logger) (*AppClient, error)\n```\nNewAppClient creates a new GitHub App client.\n\n```go\nfunc (c *AppClient) ClientForOrg(ctx context.Context, org string) (*github.Client, error)\n```\nClientForOrg returns an authenticated GitHub client for an organization.\n\n```go\nfunc (c *AppClient) HTTPClient(ctx context.Context, org string) (*http.Client, error)\n```\nHTTPClient returns an authenticated HTTP client for an organization.\n\n```go\nfunc (c *AppClient) TokenForOrg(ctx context.Context, org string) (string, error)\n```\nTokenForOrg returns an installation token for an organization.\n\n```go\ntype Manager struct {\n\t// contains filtered or unexported fields\n}\n```\nManager manages GitHub App installations across multiple orgs.\n\n```go\nfunc NewManager(ctx context.Context, appClient *AppClient, allowPersonalAccounts bool) (*Manager, error)\n```\nNewManager creates a new GitHub installation manager.\n\n```go\nfunc (m *Manager) AllOrgs() []string\n```\nAllOrgs returns all orgs with GitHub App installations.\n\n```go\nfunc (m *Manager) AppClient() *AppClient\n```\nAppClient returns the underlying AppClient for creating searchers.\n\n```go\nfunc (m *Manager) ClientForOrg(org string) (*OrgClient, bool)\n```\nClientForOrg returns the client for an org.\n\n```go\nfunc (m *Manager) RefreshInstallations(ctx context.Context) error\n```\nRefreshInstallations discovers all GitHub App installations.\n\n```go\ntype OrgClient struct {\n\t// contains filtered or unexported fields\n}\n```\nOrgClient wraps a GitHub client for an org with additional functionality.\n\n```go\nfunc (c *OrgClient) Client() *github.Client\n```\nClient returns the underlying GitHub API client.\n\n```go\nfunc (c *OrgClient) InstallationToken(ctx context.Context) (string, error)\n```\nInstallationToken returns a fresh installation token.\n\n```go\nfunc (c *OrgClient) Org() string\n```\nOrg returns the organization name.\n\n```go\ntype Searcher struct {\n\t// contains filtered or unexported fields\n}\n```\nSearcher queries GitHub for PRs using the search API.\n\n```go\nfunc NewSearcher(appClient appClient, logger *slog.Logger) *Searcher\n```\nNewSearcher creates a new PR searcher.\n\n```go\nfunc (s *Searcher) ListAuthoredPRs(ctx context.Context, org, githubUsername string) ([]bot.PRSearchResult, error)\n```\nListAuthoredPRs returns open PRs authored by a specific user.\n\n```go\nfunc (s *Searcher) ListClosedPRs(ctx context.Context, org string, closedWithinHours int) ([]bot.PRSearchResult, error)\n```\nListClosedPRs returns recently closed/merged PRs for catching terminal states.\n\n```go\nfunc (s *Searcher) ListOpenPRs(ctx context.Context, org string, updatedWithinHours int) ([]bot.PRSearchResult, error)\n```\nListOpenPRs returns open PRs for an org updated within the given hours.\n\n```go\nfunc (s *Searcher) ListReviewRequestedPRs(ctx context.Context, org, githubUsername string) ([]bot.PRSearchResult, error)\n```\nListReviewRequestedPRs returns open PRs where a specific user is requested to review.\n\n","path":"github.com/codeGROOVE-dev/discordian/internal/github","name":"github","synopsis":"Package github provides GitHub App authentication and API access.","isRedistributable":true}
