Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CommitStatusProvider ¶
type CommitStatusProvider interface {
// Set sets the commit status for a given commit SHA in the specified repository.
Set(ctx context.Context, commitStatus *v1alpha1.CommitStatus) (*v1alpha1.CommitStatus, error)
}
CommitStatusProvider defines the interface for managing commit statuses in a source control management system.
type GitOperationsProvider ¶
type GitOperationsProvider interface {
// GetGitHttpsRepoUrl constructs the HTTPS URL for a Git repository based on the provided GitRepository object.
GetGitHttpsRepoUrl(gitRepo v1alpha1.GitRepository) string
// GetToken retrieves the authentication token.
GetToken(ctx context.Context) (string, error)
// GetUser returns the user name for authentication.
GetUser(ctx context.Context) (string, error)
}
GitOperationsProvider defines the interface for performing Git operations.
type PullRequestProvider ¶
type PullRequestProvider interface {
// Create creates a new pull request with the specified title, head, base, and description.
Create(ctx context.Context, title, head, base, description string, pullRequest v1alpha1.PullRequest) (string, error)
// Close closes an existing pull request.
Close(ctx context.Context, pullRequest v1alpha1.PullRequest) error
// Update updates an existing pull request with the specified title, description, and pull request details.
Update(ctx context.Context, title, description string, pullRequest v1alpha1.PullRequest) error
// Merge merges an existing pull request with the specified commit message.
Merge(ctx context.Context, pullRequest v1alpha1.PullRequest) error
// FindOpen checks if a pull request is open and returns its status.
FindOpen(ctx context.Context, pullRequest v1alpha1.PullRequest) (bool, v1alpha1.PullRequestCommonStatus, error)
// GetUrl retrieves the URL of the pull request.
GetUrl(ctx context.Context, pullRequest v1alpha1.PullRequest) (string, error)
}
PullRequestProvider defines the interface for managing pull requests in a source control management system.
Click to show internal directories.
Click to hide internal directories.