Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewOrgTokenSource ¶ added in v0.7.5
func NewOrgTokenSource(ctx context.Context, identity, org string) oauth2.TokenSource
NewOrgTokenSource creates a new token source for org-scoped GitHub credentials
func NewRepoTokenSource ¶ added in v0.7.5
func NewRepoTokenSource(ctx context.Context, identity, org, repo string) oauth2.TokenSource
NewRepoTokenSource creates a new token source for repo-scoped GitHub credentials
Types ¶
type ClientCache ¶
type ClientCache struct {
// contains filtered or unexported fields
}
ClientCache manages GitHub clients for multiple org/repo combinations.
func NewClientCache ¶
func NewClientCache(tokenSourceFunc TokenSourceFunc) *ClientCache
NewClientCache creates a new client cache with the provided token source function.
type Option ¶
type Option func(*Reconciler)
Option configures a Reconciler.
func WithOrgScopedCredentials ¶ added in v0.7.0
func WithOrgScopedCredentials() Option
WithOrgScopedCredentials configures the reconciler to use org-scoped credentials instead of repo-scoped credentials. When enabled, the same GitHub client will be used for all repositories within an organization.
func WithReconciler ¶
func WithReconciler(f ReconcilerFunc) Option
WithReconciler sets the reconciler function for all resource types.
type Reconciler ¶
type Reconciler struct {
workqueue.UnimplementedWorkqueueServiceServer
// contains filtered or unexported fields
}
Reconciler manages the reconciliation of GitHub resources.
func NewReconciler ¶
func NewReconciler(cc *ClientCache, opts ...Option) *Reconciler
NewReconciler creates a new Reconciler with the given options.
func (*Reconciler) Process ¶ added in v0.6.196
func (r *Reconciler) Process(ctx context.Context, req *workqueue.ProcessRequest) (*workqueue.ProcessResponse, error)
Process implements the WorkqueueService.Process RPC.
type ReconcilerFunc ¶
ReconcilerFunc is the function signature for GitHub resource reconcilers. It receives the parsed resource information and appropriate GitHub client, and returns an error if reconciliation fails.
type Resource ¶
type Resource struct {
// Owner is the GitHub organization or user.
Owner string
// Repo is the repository name.
Repo string
// Number is the issue or pull request number.
// Only set for ResourceTypeIssue and ResourceTypePullRequest.
Number int
// Type indicates the resource type.
Type ResourceType
// URL is the original URL that was parsed.
URL string
// Ref is the branch, tag, or commit SHA.
// Only set for ResourceTypePath.
Ref string
// Path is the file or directory path.
// Only set for ResourceTypePath.
Path string
}
Resource represents a parsed GitHub resource (issue, pull request, or path).
type ResourceType ¶
type ResourceType string
ResourceType represents the type of GitHub resource.
const ( // ResourceTypeIssue represents a GitHub issue. ResourceTypeIssue ResourceType = "issue" // ResourceTypePullRequest represents a GitHub pull request. ResourceTypePullRequest ResourceType = "pull_request" // ResourceTypePath represents a file or directory path in a repository. ResourceTypePath ResourceType = "path" )
type TokenSourceFunc ¶
TokenSourceFunc is a function that creates an OAuth2 token source for a given org/repo.
Directories
¶
| Path | Synopsis |
|---|---|
|
Package changemanager provides an abstraction for managing GitHub Pull Request lifecycle operations, similar to how the statusmanager handles GitHub Check Runs.
|
Package changemanager provides an abstraction for managing GitHub Pull Request lifecycle operations, similar to how the statusmanager handles GitHub Check Runs. |
|
internal
|
|
|
Package issuemanager provides a reconciler-style abstraction for managing GitHub Issues based on desired state.
|
Package issuemanager provides a reconciler-style abstraction for managing GitHub Issues based on desired state. |
|
Package statusmanager provides Kubernetes-style status management for GitHub reconcilers using GitHub Check Runs API.
|
Package statusmanager provides Kubernetes-style status management for GitHub reconcilers using GitHub Check Runs API. |