Documentation
¶
Index ¶
- type GitHubProvider
- func (g *GitHubProvider) GetRepository(ctx context.Context, owner, repo string, settings krci.GitServerSettings) (*models.Repository, error)
- func (g *GitHubProvider) ListBranches(ctx context.Context, owner, repo string, settings krci.GitServerSettings, ...) ([]models.Branch, error)
- func (g *GitHubProvider) ListPipelines(ctx context.Context, project string, settings krci.GitServerSettings, ...) (*models.PipelinesResponse, error)
- func (g *GitHubProvider) ListPullRequests(ctx context.Context, owner, repo string, settings krci.GitServerSettings, ...) (*models.PullRequestsResponse, error)
- func (g *GitHubProvider) ListRepositories(ctx context.Context, owner string, settings krci.GitServerSettings, ...) ([]models.Repository, error)
- func (g *GitHubProvider) ListUserOrganizations(ctx context.Context, settings krci.GitServerSettings) ([]models.Organization, error)
- func (g *GitHubProvider) TriggerPipeline(_ context.Context, _ string, _ string, _ []models.PipelineVariable, ...) (*models.PipelineResponse, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GitHubProvider ¶
type GitHubProvider struct {
// contains filtered or unexported fields
}
func NewGitHubProvider ¶
func NewGitHubProvider() *GitHubProvider
func (*GitHubProvider) GetRepository ¶
func (g *GitHubProvider) GetRepository( ctx context.Context, owner, repo string, settings krci.GitServerSettings, ) (*models.Repository, error)
func (*GitHubProvider) ListBranches ¶
func (g *GitHubProvider) ListBranches( ctx context.Context, owner, repo string, settings krci.GitServerSettings, _ models.ListOptions, ) ([]models.Branch, error)
ListBranches implements BranchesProvider for GitHubService. Returns all branches for the given repository. Pagination fields in the response reflect the full result.
func (*GitHubProvider) ListPipelines ¶ added in v0.3.0
func (g *GitHubProvider) ListPipelines( ctx context.Context, project string, settings krci.GitServerSettings, opts models.PipelineListOptions, ) (*models.PipelinesResponse, error)
ListPipelines returns workflow runs for a GitHub repository.
func (*GitHubProvider) ListPullRequests ¶ added in v0.2.0
func (g *GitHubProvider) ListPullRequests( ctx context.Context, owner, repo string, settings krci.GitServerSettings, opts models.PullRequestListOptions, ) (*models.PullRequestsResponse, error)
ListPullRequests returns pull requests for the given repository with filtering and pagination. For "open" and "all" states, GitHub API handles filtering natively. For "merged" and "closed" states, post-filtering is required because GitHub API only supports state=closed (which includes both merged and truly-closed PRs).
func (*GitHubProvider) ListRepositories ¶
func (g *GitHubProvider) ListRepositories( ctx context.Context, owner string, settings krci.GitServerSettings, listOptions models.ListOptions, ) ([]models.Repository, error)
func (*GitHubProvider) ListUserOrganizations ¶
func (g *GitHubProvider) ListUserOrganizations( ctx context.Context, settings krci.GitServerSettings, ) ([]models.Organization, error)
ListUserOrganizations returns organizations for the authenticated user. Also it adds the current user as an organization.
func (*GitHubProvider) TriggerPipeline ¶ added in v0.3.0
func (g *GitHubProvider) TriggerPipeline( _ context.Context, _ string, _ string, _ []models.PipelineVariable, _ krci.GitServerSettings, ) (*models.PipelineResponse, error)
TriggerPipeline is not supported for GitHub.