gitlab

package
v14.2.1 Latest Latest
Warning

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

Go to latest
Published: May 30, 2024 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Detect

func Detect(originURL giturl.Parts) bool

Detect indicates whether the current repository is hosted on a GitLab server.

Types

type Connector

type Connector struct {
	Data
	// contains filtered or unexported fields
}

Connector provides standardized connectivity for the given repository (gitlab.com/owner/repo) via the GitLab API.

func NewConnector

func NewConnector(args NewConnectorArgs) (Connector, error)

NewGitlabConfig provides GitLab configuration data if the current repo is hosted on GitLab, otherwise nil.

func (Connector) FindProposal

func (self Connector) FindProposal(branch, target gitdomain.LocalBranchName) (Option[hostingdomain.Proposal], error)

func (Connector) SquashMergeProposal

func (self Connector) SquashMergeProposal(number int, message gitdomain.CommitMessage) error

func (Connector) UpdateProposalTarget

func (self Connector) UpdateProposalTarget(number int, target gitdomain.LocalBranchName) error

type Data added in v14.2.1

type Data struct {
	hostingdomain.Data
	APIToken Option[configdomain.GitLabToken]
}

func (Data) DefaultProposalMessage added in v14.2.1

func (self Data) DefaultProposalMessage(proposal hostingdomain.Proposal) string

func (Data) NewProposalURL added in v14.2.1

func (self Data) NewProposalURL(branch, parentBranch, _ gitdomain.LocalBranchName) (string, error)

func (Data) RepositoryURL added in v14.2.1

func (self Data) RepositoryURL() string

type NewConnectorArgs

type NewConnectorArgs struct {
	APIToken  Option[configdomain.GitLabToken]
	Log       print.Logger
	OriginURL giturl.Parts
}

Jump to

Keyboard shortcuts

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