Documentation ¶
Index ¶
- Constants
- func BuildProjectID(group, name string) string
- func PathToProjectID(pathWithName string) string
- type GitLab
- type GlProject
- func (p *GlProject) CheckDefaultRemote() error
- func (p *GlProject) CheckRemote() error
- func (p *GlProject) CheckSourceRemote() error
- func (p *GlProject) ForkProjectId() string
- func (p *GlProject) ForkRmtInfo() *gitw.RemoteInfo
- func (p *GlProject) GitLoc() *gitx.GitLoc
- func (p *GlProject) MainProjectId() string
- func (p *GlProject) MainRmtInfo() *gitw.RemoteInfo
- func (p *GlProject) ResolveBranch(brName string) (string, bool)
- func (p *GlProject) SetMainProjId(mainProjId string)
- type GlabApiV4
- type PRLinkBuilder
- type PRLinkQuery
Constants ¶
View Source
const (
ProjectIdSep = "%2F"
)
Variables ¶
This section is empty.
Functions ¶
func BuildProjectID ¶
BuildProjectID by group and name
Types ¶
type GitLab ¶
type GitLab struct { *gitx.Config // BaseApi api url BaseApi string `json:"base_api"` // Token person token. // - from /profile/personal_access_tokens Token string `json:"token"` // BranchAliases branch aliases // BranchAliases maputil.Aliases `json:"branch_aliases"` // DenyBranches deny as source branch for create PR. DenyBranches map[string]string `json:"deny_branches"` }
GitLab config struct for gitlab
Gen by:
kite go gen st -s @c -t yml --name GitLab
func (*GitLab) LocGlProject ¶
LocGlProject instance
type GlProject ¶
type GlProject struct { *GitLab // contains filtered or unexported fields }
GlProject struct
func (*GlProject) CheckDefaultRemote ¶
func (*GlProject) CheckRemote ¶
func (*GlProject) CheckSourceRemote ¶
func (*GlProject) ForkProjectId ¶
func (*GlProject) ForkRmtInfo ¶
func (p *GlProject) ForkRmtInfo() *gitw.RemoteInfo
func (*GlProject) MainProjectId ¶
func (*GlProject) MainRmtInfo ¶
func (p *GlProject) MainRmtInfo() *gitw.RemoteInfo
func (*GlProject) ResolveBranch ¶
ResolveBranch name
func (*GlProject) SetMainProjId ¶
type PRLinkBuilder ¶
PRLinkBuilder struct
type PRLinkQuery ¶
type PRLinkQuery struct { RepoPath string // SourceProjectId int or urlencode(group/name) SourceProjectId string `json:"source_project_id"` SourceBranch string `json:"source_branch"` // TargetProjectId int or urlencode(group/name) TargetProjectId string `json:"target_project_id"` TargetBranch string `json:"target_branch"` }
PRLinkQuery struct
func NewPRLinkQuery ¶
func NewPRLinkQuery(srcPid, srcBr, dstPid, dstBr string) *PRLinkQuery
NewPRLinkQuery instance
func (*PRLinkQuery) BuildURL ¶
func (b *PRLinkQuery) BuildURL(hostUrl string) string
BuildURL pr link url
func (*PRLinkQuery) QueryString ¶
func (b *PRLinkQuery) QueryString() string
QueryString build query string.
Click to show internal directories.
Click to hide internal directories.