Documentation ¶
Overview ¶
Package gitlab is an internal wrapper for the go-gitlab package
Most functions serve to expose debug logging if set and accept a project name string over an ID
Index ¶
- Constants
- Variables
- func BranchPushed(pid interface{}, branch string) bool
- func FindProject(project string) (*gitlab.Project, error)
- func Fork(project string) (string, error)
- func Host() string
- func Init(_host, _user, _token string)
- func IssueClose(pid interface{}, id int) error
- func IssueCreate(project string, opts *gitlab.CreateIssueOptions) (string, error)
- func IssueGet(project string, issueNum int) (*gitlab.Issue, error)
- func IssueList(project string, opts *gitlab.ListProjectIssuesOptions) ([]*gitlab.Issue, error)
- func Lint(content string) (bool, error)
- func LoadGitLabTmpl(tmplName string) string
- func MRClose(pid interface{}, id int) error
- func MRCreate(project string, opts *gitlab.CreateMergeRequestOptions) (string, error)
- func MRGet(project string, mrNum int) (*gitlab.MergeRequest, error)
- func MRList(project string, opts *gitlab.ListProjectMergeRequestsOptions) ([]*gitlab.MergeRequest, error)
- func MRMerge(pid interface{}, id int) error
- func ProjectSnippetCreate(pid interface{}, opts *gitlab.CreateProjectSnippetOptions) (*gitlab.Snippet, error)
- func ProjectSnippetDelete(pid interface{}, id int) error
- func ProjectSnippetList(pid interface{}, opts *gitlab.ListProjectSnippetsOptions) ([]*gitlab.Snippet, error)
- func SnippetCreate(opts *gitlab.CreateSnippetOptions) (*gitlab.Snippet, error)
- func SnippetDelete(id int) error
- func SnippetList(opts *gitlab.ListSnippetsOptions) ([]*gitlab.Snippet, error)
- func User() string
Constants ¶
const ( TmplMR = "merge_request_templates/default.md" TmplIssue = "issue_templates/default.md" )
Defines filepath for default GitLab templates
Variables ¶
var (
ErrProjectNotFound = errors.New("gitlab project not found")
)
Functions ¶
func BranchPushed ¶ added in v0.5.2
BranchPushed checks if a branch exists on a GitLab project
func FindProject ¶
FindProject looks up the Gitlab project. If the namespace is not provided in the project string it will search for projects in the users namespace
func Host ¶ added in v0.6.0
func Host() string
Host exposes the GitLab scheme://hostname used to interact with the API
func Init ¶ added in v0.6.0
func Init(_host, _user, _token string)
Init initializes a gitlab client for use throughout lab.
func IssueClose ¶ added in v0.8.0
IssueClose closes an issue on a GitLab project
func IssueCreate ¶
IssueCreate opens a new issue on a GitLab Project
func LoadGitLabTmpl ¶ added in v0.5.1
LoadGitLabTmpl loads gitlab templates for use in creating Issues and MRs
func MRList ¶ added in v0.8.0
func MRList(project string, opts *gitlab.ListProjectMergeRequestsOptions) ([]*gitlab.MergeRequest, error)
MRList lists the MRs on a GitLab project
func ProjectSnippetCreate ¶ added in v0.6.0
func ProjectSnippetCreate(pid interface{}, opts *gitlab.CreateProjectSnippetOptions) (*gitlab.Snippet, error)
ProjectSnippetCreate creates a snippet in a project
func ProjectSnippetDelete ¶ added in v0.6.0
ProjectSnippetDelete deletes a project snippet
func ProjectSnippetList ¶ added in v0.6.0
func ProjectSnippetList(pid interface{}, opts *gitlab.ListProjectSnippetsOptions) ([]*gitlab.Snippet, error)
ProjectSnippetList lists snippets on a project
func SnippetCreate ¶ added in v0.6.0
func SnippetCreate(opts *gitlab.CreateSnippetOptions) (*gitlab.Snippet, error)
SnippetCreate creates a personal snippet
func SnippetDelete ¶ added in v0.6.0
SnippetDelete deletes a personal snippet
func SnippetList ¶ added in v0.6.0
func SnippetList(opts *gitlab.ListSnippetsOptions) ([]*gitlab.Snippet, error)
SnippetList lists snippets on a project
Types ¶
This section is empty.