Documentation ¶
Index ¶
- type Config
- type Gitlab
- func (g *Gitlab) ClosePullRequest(ctx context.Context, pullReq scm.PullRequest) error
- func (g *Gitlab) CreatePullRequest(ctx context.Context, repo scm.Repository, prRepo scm.Repository, ...) (scm.PullRequest, error)
- func (g *Gitlab) ForkRepository(ctx context.Context, repo scm.Repository, newOwner string) (scm.Repository, error)
- func (g *Gitlab) GetOpenPullRequest(ctx context.Context, repo scm.Repository, branchName string) (scm.PullRequest, error)
- func (g *Gitlab) GetPullRequests(ctx context.Context, branchName string) ([]scm.PullRequest, error)
- func (g *Gitlab) GetRepositories(ctx context.Context) ([]scm.Repository, error)
- func (g *Gitlab) MergePullRequest(ctx context.Context, pullReq scm.PullRequest) error
- func (g *Gitlab) UpdatePullRequest(ctx context.Context, repo scm.Repository, pullReq scm.PullRequest, ...) (scm.PullRequest, error)
- type ProjectReference
- type RepositoryListing
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Gitlab ¶
type Gitlab struct { RepositoryListing Config Config // contains filtered or unexported fields }
Gitlab contain gitlab configuration
func New ¶
func New(token, baseURL string, repoListing RepositoryListing, config Config) (*Gitlab, error)
New create a new Gitlab client
func (*Gitlab) ClosePullRequest ¶
ClosePullRequest closes a pull request
func (*Gitlab) CreatePullRequest ¶
func (g *Gitlab) CreatePullRequest(ctx context.Context, repo scm.Repository, prRepo scm.Repository, newPR scm.NewPullRequest) (scm.PullRequest, error)
CreatePullRequest creates a pull request
func (*Gitlab) ForkRepository ¶ added in v0.27.0
func (g *Gitlab) ForkRepository(ctx context.Context, repo scm.Repository, newOwner string) (scm.Repository, error)
ForkRepository forks a project
func (*Gitlab) GetOpenPullRequest ¶ added in v0.37.0
func (g *Gitlab) GetOpenPullRequest(ctx context.Context, repo scm.Repository, branchName string) (scm.PullRequest, error)
GetOpenPullRequest gets a pull request for one specific repository
func (*Gitlab) GetPullRequests ¶
GetPullRequests gets all pull requests of with a specific branch
func (*Gitlab) GetRepositories ¶
GetRepositories fetches repositories from all sources (groups/user/specific project)
func (*Gitlab) MergePullRequest ¶
MergePullRequest merges a pull request
func (*Gitlab) UpdatePullRequest ¶ added in v0.50.0
func (g *Gitlab) UpdatePullRequest(ctx context.Context, repo scm.Repository, pullReq scm.PullRequest, updatedPR scm.NewPullRequest) (scm.PullRequest, error)
UpdatePullRequest updates an existing pull request
type ProjectReference ¶
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 Topics []string SkipForks bool }
RepositoryListing contains information about which repositories that should be fetched