gitlab

package
v0.7.0-rc.2 Latest Latest
Warning

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

Go to latest
Published: Jun 4, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	GitProviderServiceName = "gitlab"
)

Variables

This section is empty.

Functions

func NewGitLabProvider

func NewGitLabProvider() (gitprovider.GitProviderService, error)

Types

type GitLabClient

type GitLabClient struct {
	MergeRequests MergeRequestClient
}

type GitLabProvider

type GitLabProvider struct {
	// contains filtered or unexported fields
}

func (*GitLabProvider) CreatePullRequest

func (g *GitLabProvider) CreatePullRequest(
	_ context.Context,
	repoURL string,
	opts gitprovider.CreatePullRequestOpts,
) (*gitprovider.PullRequest, error)

func (*GitLabProvider) GetPullRequest

func (g *GitLabProvider) GetPullRequest(
	_ context.Context,
	repoURL string,
	id int64,
) (*gitprovider.PullRequest, error)

func (*GitLabProvider) IsPullRequestMerged

func (g *GitLabProvider) IsPullRequestMerged(_ context.Context, repoURL string, id int64) (bool, error)

func (*GitLabProvider) ListPullRequests

func (g *GitLabProvider) ListPullRequests(
	_ context.Context,
	repoURL string,
	opts gitprovider.ListPullRequestOpts,
) ([]*gitprovider.PullRequest, error)

func (*GitLabProvider) WithAuthToken

func (g *GitLabProvider) WithAuthToken(token string) (gitprovider.GitProviderService, error)

type MergeRequestClient

type MergeRequestClient interface {
	CreateMergeRequest(
		pid any,
		opt *gitlab.CreateMergeRequestOptions,
		options ...gitlab.RequestOptionFunc,
	) (*gitlab.MergeRequest, *gitlab.Response, error)

	ListProjectMergeRequests(
		pid any,
		opt *gitlab.ListProjectMergeRequestsOptions,
		options ...gitlab.RequestOptionFunc,
	) ([]*gitlab.MergeRequest, *gitlab.Response, error)

	GetMergeRequest(
		pid any,
		mergeRequest int,
		opt *gitlab.GetMergeRequestsOptions,
		options ...gitlab.RequestOptionFunc,
	) (*gitlab.MergeRequest, *gitlab.Response, error)
}

Jump to

Keyboard shortcuts

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