scm

package
v0.15.0 Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2021 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Unmarshal

func Unmarshal(scm map[string]interface{}) (Scm, PullRequest, error)

Unmarshal parses a scm struct like git or github and returns a scm interface

Types

type MockScm added in v0.13.0

type MockScm struct {
	Scm
	WorkingDir   string
	ChangedFiles []string
	Err          error
}

MockScm is a stub implementation of the `Scm` interface to be used in our unit test suites. It stores the expected WorkingDir

func (*MockScm) GetChangedFiles added in v0.13.0

func (m *MockScm) GetChangedFiles(workingDir string) ([]string, error)

func (*MockScm) GetDirectory added in v0.13.0

func (m *MockScm) GetDirectory() (directory string)

type PullRequest

type PullRequest interface {
	CreatePullRequest(title, changelog, pipelineReport string) error
}

PullRequest interface defines required funcions to be an pullRequest

type Scm

type Scm interface {
	Add(files []string) error
	Clone() (string, error)
	Checkout() error
	GetDirectory() (directory string)
	Init(source string, pipelineID string) error
	Push() error
	Commit(message string) error
	Clean() error
	PushTag(tag string) error
	GetChangedFiles(workingDir string) ([]string, error)
}

Scm is an interface that offers common functions for a source control manager like git or github

Jump to

Keyboard shortcuts

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