Documentation
¶
Index ¶
- func GetClient(secret v1.Secret, domain string) (*gitlab.Client, error)
- type CommitStatus
- type GitAuthenticationProvider
- type PullRequest
- func (pr *PullRequest) Close(ctx context.Context, prObj v1alpha1.PullRequest) error
- func (pr *PullRequest) Create(ctx context.Context, title, head, base, desc string, ...) (string, error)
- func (pr *PullRequest) FindOpen(ctx context.Context, prObj v1alpha1.PullRequest) (bool, v1alpha1.PullRequestCommonStatus, error)
- func (pr *PullRequest) GetUrl(ctx context.Context, prObj v1alpha1.PullRequest) (string, error)
- func (pr *PullRequest) Merge(ctx context.Context, prObj v1alpha1.PullRequest) error
- func (pr *PullRequest) Update(ctx context.Context, title, description string, prObj v1alpha1.PullRequest) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type CommitStatus ¶
type CommitStatus struct {
// contains filtered or unexported fields
}
CommitStatus implements the scms.CommitStatusProvider interface for GitLab.
func NewGitlabCommitStatusProvider ¶
func NewGitlabCommitStatusProvider(k8sClient client.Client, secret v1.Secret, domain string) (*CommitStatus, error)
NewGitlabCommitStatusProvider creates a new instance of CommitStatus for GitLab.
func (*CommitStatus) Set ¶
func (cs *CommitStatus) Set(ctx context.Context, commitStatus *v1alpha1.CommitStatus) (*v1alpha1.CommitStatus, error)
Set sets the commit status for a given commit SHA in the specified repository.
type GitAuthenticationProvider ¶
type GitAuthenticationProvider struct {
// contains filtered or unexported fields
}
GitAuthenticationProvider implements the scms.GitOperationsProvider interface for GitLab.
func NewGitlabGitAuthenticationProvider ¶
func NewGitlabGitAuthenticationProvider(scmProvider v1alpha1.GenericScmProvider, secret *v1.Secret) (*GitAuthenticationProvider, error)
NewGitlabGitAuthenticationProvider creates a new instance of GitAuthenticationProvider for GitLab.
func (GitAuthenticationProvider) GetGitHttpsRepoUrl ¶
func (gl GitAuthenticationProvider) GetGitHttpsRepoUrl(repo v1alpha1.GitRepository) string
GetGitHttpsRepoUrl constructs the HTTPS URL for a GitLab repository based on the provided GitRepository object.
type PullRequest ¶
type PullRequest struct {
// contains filtered or unexported fields
}
PullRequest implements the scms.PullRequestProvider interface for GitLab.
func NewGitlabPullRequestProvider ¶
func NewGitlabPullRequestProvider(k8sClient client.Client, secret v1.Secret, domain string) (*PullRequest, error)
NewGitlabPullRequestProvider creates a new instance of PullRequest for GitLab.
func (*PullRequest) Close ¶
func (pr *PullRequest) Close(ctx context.Context, prObj v1alpha1.PullRequest) error
Close closes an existing pull request.
func (*PullRequest) Create ¶
func (pr *PullRequest) Create(ctx context.Context, title, head, base, desc string, prObj v1alpha1.PullRequest) (string, error)
Create creates a new pull request with the specified title, head, base, and description.
func (*PullRequest) FindOpen ¶
func (pr *PullRequest) FindOpen(ctx context.Context, prObj v1alpha1.PullRequest) (bool, v1alpha1.PullRequestCommonStatus, error)
FindOpen checks if a pull request is open and returns its status.
func (*PullRequest) GetUrl ¶ added in v0.10.0
func (pr *PullRequest) GetUrl(ctx context.Context, prObj v1alpha1.PullRequest) (string, error)
GetUrl retrieves the URL of the pull request.
func (*PullRequest) Merge ¶
func (pr *PullRequest) Merge(ctx context.Context, prObj v1alpha1.PullRequest) error
Merge merges an existing pull request with the specified commit message.
func (*PullRequest) Update ¶
func (pr *PullRequest) Update(ctx context.Context, title, description string, prObj v1alpha1.PullRequest) error
Update updates an existing pull request with the specified title and description.