Documentation
¶
Index ¶
- Variables
- func SetBranchPrefix(feature, hotfix, conflictResolve, issue string)
- func SetBranchSetting(master, dev, test BranchTyp)
- type BranchSetting
- type BranchTyp
- type Config
- type FlowContext
- func (c *FlowContext) APIEndpoint() string
- func (c *FlowContext) CWD() string
- func (c *FlowContext) ConfPath() string
- func (c *FlowContext) ForceRemote() bool
- func (c *FlowContext) GetOAuth() *OAuth
- func (c *FlowContext) InjectProject(p *ProjectBasics)
- func (c *FlowContext) IsDebug() bool
- func (c *FlowContext) Project() *ProjectBasics
- func (c *FlowContext) ProjectName() string
- func (c *FlowContext) ShouldOpenBrowser() bool
- type OAuth
- type OpFeatureContext
- type OpHotfixContext
- type ProjectBasics
Constants ¶
This section is empty.
Variables ¶
var ( ErrEmptyAccessToken = errors.New("empty access token") ErrEmptyGitlabAPI = errors.New("empty gitlab API URL") )
var ( FeatureBranchPrefix = "feature/" HotfixBranchPrefix = "hotfix/" ConflictResolveBranchPrefix = "conflict-resolve/" IssueBranchPrefix = "issue/" )
Functions ¶
func SetBranchPrefix ¶ added in v1.8.0
func SetBranchPrefix(feature, hotfix, conflictResolve, issue string)
func SetBranchSetting ¶ added in v1.8.0
func SetBranchSetting(master, dev, test BranchTyp)
SetBranchSetting reset builtin branch enums manually.
Types ¶
type BranchSetting ¶ added in v1.7.0
type BranchSetting struct {
Master, Dev, Test BranchTyp
FeatureBranchPrefix string `toml:"feature_branch_prefix"`
HotfixBranchPrefix string `toml:"hotfix_branch_prefix"`
ConflictResolveBranchPrefix string `toml:"conflict_resolve_branch_prefix"`
IssueBranchPrefix string `toml:"issue_branch_prefix"`
}
BranchSetting contains some personal setting of git branch.
type BranchTyp ¶
type BranchTyp string
BranchTyp is builtin branch type to limit parameter passing
type Config ¶
type Config struct {
OAuth2 *OAuth `toml:"oauth"`
Branch *BranchSetting `toml:"branch"`
GitlabAPIURL string `toml:"gitlab_api_url"`
GitlabHost string `toml:"gitlab_host"`
DebugMode bool `toml:"debug"`
OpenBrowser bool `toml:"open_browser"`
}
Config contains all fields can be specified by user.
type FlowContext ¶
type FlowContext struct {
// contains filtered or unexported fields
}
FlowContext contains all necessary parameters of flow command to execute. SHOULD NOT export context attributes to another package.
func NewContext ¶
func NewContext(cwd, confPath, projectName string, c *Config, forceRemote bool) *FlowContext
NewContext be generated with non project information. Do not use Project directly!!!
func (*FlowContext) APIEndpoint ¶ added in v1.7.0
func (c *FlowContext) APIEndpoint() string
func (*FlowContext) CWD ¶
func (c *FlowContext) CWD() string
func (*FlowContext) ConfPath ¶
func (c *FlowContext) ConfPath() string
ConfPath return configuration path
func (*FlowContext) ForceRemote ¶ added in v1.6.2
func (c *FlowContext) ForceRemote() bool
ForceRemote return should module need to locate project by projectName from remote. true means locate project from remote, false means do not jump the process of locating project from local.
func (*FlowContext) GetOAuth ¶ added in v1.7.0
func (c *FlowContext) GetOAuth() *OAuth
func (*FlowContext) InjectProject ¶ added in v1.7.0
func (c *FlowContext) InjectProject(p *ProjectBasics)
func (*FlowContext) IsDebug ¶ added in v1.7.0
func (c *FlowContext) IsDebug() bool
func (*FlowContext) Project ¶
func (c *FlowContext) Project() *ProjectBasics
func (*FlowContext) ProjectName ¶ added in v1.6.0
func (c *FlowContext) ProjectName() string
ProjectName return project name.
func (*FlowContext) ShouldOpenBrowser ¶ added in v1.7.0
func (c *FlowContext) ShouldOpenBrowser() bool
type OpFeatureContext ¶ added in v1.6.4
type OpFeatureContext struct {
// ForceCreateMergeRequest if this is true, means merge request would be create no matter whether
// merge request has been created or merged.
ForceCreateMergeRequest bool
// FeatureBranchName specify which branch name to use in the lifecycle of feature operations.
FeatureBranchName string
// AutoMergeRequest if this is true, means merge request would be merged automatically.
AutoMergeRequest bool
// ParseIssueCompatible if this is true, means parse issueName to feature in compatible way.
ParseIssueCompatible bool
}
OpFeatureContext contains all parameters of features' operations in common.
type OpHotfixContext ¶ added in v1.9.0
type OpHotfixContext struct {
// ForceCreateMergeRequest if this is true, means merge request would be create no matter whether
// merge request has been created or merged.
ForceCreateMergeRequest bool
}
type ProjectBasics ¶
ProjectBasics contains basic attributes of project.