Documentation
¶
Overview ¶
Package githubprovider implements a provider for GitHub API operations.
It supports read operations (repos, files, issues, PRs, releases, branches, tags) via the GitHub GraphQL API, write operations (issues, PRs, commits, branches, tags) via GraphQL mutations, and release writes via the REST API (no GraphQL mutation exists).
Commit operations use the createCommitOnBranch GraphQL mutation which produces GPG-signed commits automatically — no local key management required.
Authentication is handled automatically using the configured GitHub auth handler.
Index ¶
Constants ¶
const ProviderName = "github"
ProviderName is the registered name for this provider.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GitHubProvider ¶
type GitHubProvider struct {
// contains filtered or unexported fields
}
GitHubProvider implements GitHub API operations as a provider.
func NewGitHubProvider ¶
func NewGitHubProvider(opts ...Option) *GitHubProvider
NewGitHubProvider creates a new GitHub API provider.
func (*GitHubProvider) Descriptor ¶
func (p *GitHubProvider) Descriptor() *provider.Descriptor
Descriptor returns the provider metadata, schema, and capabilities.
type GraphQLError ¶
type GraphQLError struct {
Errors []graphqlError
}
GraphQLError is returned when the GraphQL API returns errors in the response body.
func (*GraphQLError) Error ¶
func (e *GraphQLError) Error() string
Error implements the error interface.
type Option ¶
type Option func(*GitHubProvider)
Option configures a GitHubProvider.
func WithClient ¶
WithClient sets a custom httpc.Client (useful for testing).
func WithRetryConfig ¶ added in v0.9.0
func WithRetryConfig(commitMaxAttempts int, commitRetryBackoff time.Duration, waitMaxAttempts int, waitPollInterval time.Duration, initRepoMaxRetries int, initRepoRetryBackoff time.Duration) Option
WithRetryConfig overrides the default retry timing (useful for testing). Attempt counts are clamped to a minimum of 1; durations are clamped to >= 0.