gitlab

package
v0.11.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 28, 2025 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetClient

func GetClient(secret v1.Secret, domain string) (*gitlab.Client, error)

GetClient creates a new GitLab client using the provided secret and domain.

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.

func (GitAuthenticationProvider) GetToken

GetToken retrieves the GitLab access token from the secret.

func (GitAuthenticationProvider) GetUser

GetUser returns a placeholder user for GitLab authentication.

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

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL