Documentation
¶
Overview ¶
Package glabtest provides an in-memory GitLab that answers `glab api` calls.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Repo = protocol.Repo{Host: "gitlab.example", Path: projectPath}
Repo is the repository the fake answers for.
Functions ¶
This section is empty.
Types ¶
type GitLab ¶
type GitLab struct {
MRs map[int]*glab.MR
Calls []Call
// Fail makes the next call matching "METHOD endpoint-suffix" fail.
Fail map[string]error
// OnMerge runs when an MR is merged, e.g. to update the git remote.
OnMerge func(mr *glab.MR, squash bool) error
// Project is returned by GET projects/:project.
Project glab.ProjectInfo
// PendingPolls makes a merged MR report "opened" with auto-merge set for
// this many GETs before it shows as merged, like a running pipeline.
PendingPolls int
// Protected lists protected branches; "main" is the default branch.
Protected map[string]bool
// contains filtered or unexported fields
}
GitLab is a fake project's merge requests.
Click to show internal directories.
Click to hide internal directories.