shell

package
v0.14.0 Latest Latest
Warning

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

Go to latest
Published: Oct 7, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	PageSources = RepoPage{
		Name:         "sources",
		GithubUrl:    "https://github.com/%v/%v",
		BitbucketUrl: "https://bitbucket.org/%v/%v",
	}
	PageBranches = RepoPage{
		Name:         "branches",
		GithubUrl:    "https://github.com/%v/%v/branches",
		BitbucketUrl: "https://bitbucket.org/%v/%v/branches",
	}
	PageBuilds = RepoPage{
		Name:         "builds",
		GithubUrl:    "https://github.com/%v/%v/actions",
		BitbucketUrl: "https://bitbucket.org/%v/%v/pipelines",
	}
	PagePulls = RepoPage{
		Name:         "pulls",
		GithubUrl:    "https://github.com/%v/%v/pulls",
		BitbucketUrl: "https://bitbucket.org/%v/%v/pull-requests",
	}
)

Functions

func OpenPage added in v0.9.0

func OpenPage(repo *model.Repo, page RepoPage) (string, error)

Types

type NativeShell added in v0.10.0

type NativeShell struct {
}

func (*NativeShell) RunCommand added in v0.10.0

func (r *NativeShell) RunCommand(commandRootDirectory string, command string, arguments ...string) (string, error)

RunCommand Runs a shell command in commandRootDirectory. If the commandRootDirectory is empty, runs the command from the current working directory. It returns combined stdout and stderr content, as it's visible in console

type RepoPage added in v0.9.0

type RepoPage struct {
	Name         string
	GithubUrl    string
	BitbucketUrl string
}

func (*RepoPage) Set added in v0.9.0

func (p *RepoPage) Set(v string) error

func (*RepoPage) String added in v0.9.0

func (p *RepoPage) String() string

func (*RepoPage) Type added in v0.9.0

func (p *RepoPage) Type() string

type RepoType added in v0.9.0

type RepoType interface {
	// contains filtered or unexported methods
}

type RepoTypeBitbucketOrg added in v0.9.0

type RepoTypeBitbucketOrg struct {
}

type RepoTypeGithubCom added in v0.9.0

type RepoTypeGithubCom struct {
}

type RepoTypeName added in v0.9.0

type RepoTypeName string
const (
	RepoTypeNameGithubCom    RepoTypeName = "github.com"
	RepoTypeNameBitbucketOrg RepoTypeName = "bitbucket.org"
)

type Shell added in v0.10.0

type Shell interface {
	RunCommand(commandRootDirectory string, command string, arguments ...string) (string, error)
}

Jump to

Keyboard shortcuts

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