gitlab

package
v0.0.0-...-8c519d9 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	HEADS = "refs/heads/%s"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type GitlabClient

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

func NewGitlabClient

func NewGitlabClient(accessToken, baseUrl string) (*GitlabClient, error)

func (*GitlabClient) CloseMergeRequest

func (gc *GitlabClient) CloseMergeRequest(projectID string, mergeRequestIID int) error

CloseMergeRequest closes merge request in Gitlab repo by given MR IID

func (*GitlabClient) CreateBranch

func (gc *GitlabClient) CreateBranch(projectID, newBranchName, defaultBranch string) error

CreateBranch creates a new branch in a GitLab project with the given projectID and newBranchName

func (*GitlabClient) CreateGitlabNewBranch

func (gc *GitlabClient) CreateGitlabNewBranch(projectID, branchName, sha, baseBranch string) error

CreateGitlabNewBranch creates a new branch

func (*GitlabClient) DeleteBranch

func (gc *GitlabClient) DeleteBranch(projectID, branchName string) error

DeleteBranch deletes a branch by its name and project ID

func (*GitlabClient) ExistsBranch

func (gc *GitlabClient) ExistsBranch(projectID, branchName string) (bool, error)

ExistsBranch checks if a branch exists in a specified GitLab repository.

func (*GitlabClient) GetClient

func (gc *GitlabClient) GetClient() *gitlabClient.Client

GetClient returns the underlying gitlab client

func (*GitlabClient) GetMergeRequests

func (gc *GitlabClient) GetMergeRequests() ([]*gitlab.MergeRequest, error)

GetMergeRequests returns a list of all MergeRequests in a given project ID and repository name

Jump to

Keyboard shortcuts

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