scm

package
v1.16.0 Latest Latest
Warning

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

Go to latest
Published: Feb 26, 2025 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GitManager

type GitManager struct {
	// contains filtered or unexported fields
}

func NewGitManager

func NewGitManager(localRepositoryWorkingDir string) (gm *GitManager, err error)

func (*GitManager) GetSourceControlContext

func (gm *GitManager) GetSourceControlContext() (gitInfo *services.XscGitInfoContext, err error)

Detect git information

type ScProvider

type ScProvider string

ScProvider is the type of source control provider

const (
	Github        ScProvider = "github"
	Gitlab        ScProvider = "gitlab"
	Bitbucket     ScProvider = "bitbucket"
	Azure         ScProvider = "azure"
	Gerrit        ScProvider = "gerrit"
	Gitea         ScProvider = "gitea"
	AWSCodeCommit ScProvider = "codecommit"

	Unknown ScProvider = ""
)

func (ScProvider) String

func (sp ScProvider) String() string

type ScType

type ScType string

ScType is the type of source control manager

const (
	Git ScType = "git"
)

func (ScType) String

func (st ScType) String() string

type ScmManager

type ScmManager interface {
	GetSourceControlContext() (gitInfo *services.XscGitInfoContext, err error)
}

func DetectScmInProject

func DetectScmInProject(projectPath string) (manager ScmManager, err error)

type ScmTypeData

type ScmTypeData struct {
	// contains filtered or unexported fields
}

ScmTypeData holds the data for each source control manager type

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳