Documentation ¶
Index ¶
- Constants
- type GitlabClient
- func (gc *GitlabClient) CloseMergeRequest(projectID string, mergeRequestIID int) error
- func (gc *GitlabClient) CreateBranch(projectID, newBranchName, defaultBranch string) error
- func (gc *GitlabClient) CreateGitlabNewBranch(projectID, branchName, sha, baseBranch string) error
- func (gc *GitlabClient) DeleteBranch(projectID, branchName string) error
- func (gc *GitlabClient) ExistsBranch(projectID, branchName string) (bool, error)
- func (gc *GitlabClient) GetClient() *gitlabClient.Client
- func (gc *GitlabClient) GetMergeRequests() ([]*gitlab.MergeRequest, error)
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
Click to show internal directories.
Click to hide internal directories.