internal

package
v1.7.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 22, 2022 License: MIT Imports: 20 Imported by: 0

Documentation

Index

Constants

View Source
const (
	FeatureBranchPrefix         = "feature/"
	HotfixBranchPrefix          = "hotfix/"
	ConflictResolveBranchPrefix = "conflict-resolve/"
	IssueBranchPrefix           = "issue/"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type IDash

type IDash interface {
	// FeatureDetail get feature detail
	FeatureDetail(featureBranchName string) ([]byte, error)

	// MilestoneOverview get milestone detail
	MilestoneOverview(milestoneName, branchFilter string) ([]byte, error)

	// ProjectDetail display project detail, includes: project web URL
	ProjectDetail(module string) ([]byte, error)
}

IDash is used to display useful data of current development stage, and also to analyze user developing data.

func NewDash

func NewDash(ctx *types.FlowContext) IDash

type IFlow

type IFlow interface {
	// FeatureBegin open a milestone and related to a feature branch,
	// then CLI would automate fetch origin branches and pull them to local.
	// Of course, flow would save data in local storage.
	FeatureBegin(opc *types.OpFeatureContext, title, desc string) error
	// FeatureDebugging open a MergeRequest of feature branch and types.DevBranch branch.
	FeatureDebugging(opc *types.OpFeatureContext) error
	// FeatureTest open a MergeRequest of feature branch and types.TestBranch branch.
	FeatureTest(opc *types.OpFeatureContext) error
	// FeatureRelease open a MergeRequest of feature branch and types.MasterBranch branch.
	FeatureRelease(opc *types.OpFeatureContext) error

	// FeatureResolveConflict will check out a new branch from target branch,
	// then create a merge request from current feature branch to the new branch.
	// newBranch = "resolve-conflict/featureBranchName-to-master"
	FeatureResolveConflict(opc *types.OpFeatureContext, targetBranch types.BranchTyp) error

	// FeatureBeginIssue checkout a issue branch from feature branch, also open a merge request
	// which is from issue branch to feature branch.
	FeatureBeginIssue(opc *types.OpFeatureContext, title, desc string) error
	// FeatureFinishIssue open the WebURL of merge request which is from issue branch to feature branch.
	FeatureFinishIssue(opc *types.OpFeatureContext, issueBranchName string) error

	// HotfixBegin checkout a hotfix branch from types.MasterBranch, also open a merge request
	// which is from hotfix branch to types.MasterBranch.
	HotfixBegin(title, desc string) error
	// HotfixFinish open the WebURL of merge request which is from hotfix branch to types.MasterBranch.
	HotfixFinish(hotfixBranchName string) error

	// SyncProject synchronize project information from remote gitlab server.
	SyncProject() error
	// SyncMilestone synchronize remote repository milestone and related issues / merge requests to local.
	SyncMilestone(milestoneID int, interact bool) error
}

IFlow to control branches, MRs, milestones and issues.

func NewFlow

func NewFlow(ctx *types.FlowContext) IFlow

Directories

Path Synopsis
Package conf implements the configuration of the application.
Package conf implements the configuration of the application.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL