gitlab

package
v0.19.1 Latest Latest
Warning

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

Go to latest
Published: Feb 2, 2021 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Gitlab

type Gitlab struct {
	RepositoryListing
	// contains filtered or unexported fields
}

Gitlab contain gitlab configuration

func New

func New(token, baseURL string, repoListing RepositoryListing) (*Gitlab, error)

New create a new Gitlab client

func (*Gitlab) ClosePullRequest added in v0.13.0

func (g *Gitlab) ClosePullRequest(ctx context.Context, pullReq domain.PullRequest) error

ClosePullRequest closes a pull request

func (*Gitlab) CreatePullRequest

func (g *Gitlab) CreatePullRequest(ctx context.Context, repo domain.Repository, newPR domain.NewPullRequest) (domain.PullRequest, error)

CreatePullRequest creates a pull request

func (*Gitlab) GetPullRequestStatuses

func (g *Gitlab) GetPullRequestStatuses(ctx context.Context, branchName string) ([]domain.PullRequest, error)

GetPullRequestStatuses gets the statuses of all pull requests of with a specific branch

func (*Gitlab) GetRepositories

func (g *Gitlab) GetRepositories(ctx context.Context) ([]domain.Repository, error)

GetRepositories fetches repositories from all sources (groups/user/specific project)

func (*Gitlab) MergePullRequest

func (g *Gitlab) MergePullRequest(ctx context.Context, pullReq domain.PullRequest) error

MergePullRequest merges a pull request

type ProjectReference

type ProjectReference struct {
	OwnerName string
	Name      string
}

ProjectReference contains information to be able to reference a repository

func ParseProjectReference

func ParseProjectReference(val string) (ProjectReference, error)

ParseProjectReference parses a repository reference from the format "ownerName/repoName"

type RepositoryListing

type RepositoryListing struct {
	Groups   []string
	Users    []string
	Projects []ProjectReference
}

RepositoryListing contains information about which repositories that should be fetched

Jump to

Keyboard shortcuts

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