domain

package
v0.24.2 Latest Latest
Warning

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

Go to latest
Published: Apr 1, 2021 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CommitAuthor added in v0.9.0

type CommitAuthor struct {
	Name  string
	Email string
}

CommitAuthor is the data (name and email) used when a commit is made

type Error

type Error string

Error exist to create constant errors

const (
	NoChangeError    Error = "no data was changed"
	ExitCodeError    Error = "the program exited with a non zero exit code"
	BranchExistError Error = "the new branch does already exist"
)

Constant errors

func (Error) Error

func (e Error) Error() string

type MergeType added in v0.19.0

type MergeType int

MergeType is the way a pull request is "merged" into the base branch

const (
	MergeTypeUnknown MergeType = iota
	MergeTypeMerge
	MergeTypeRebase
	MergeTypeSquash
)

All MergeTypes

func MergeTypeIntersection added in v0.19.0

func MergeTypeIntersection(mergeTypes1, mergeTypes2 []MergeType) []MergeType

MergeTypeIntersection calculates the intersection of two merge type slices, The order of the first slice will be preserved

func ParseMergeType added in v0.19.0

func ParseMergeType(typ string) (MergeType, error)

ParseMergeType parses a merge type

type NewPullRequest

type NewPullRequest struct {
	Title string
	Body  string
	Head  string
	Base  string

	Reviewers []string // The username of all reviewers
}

NewPullRequest is the data needed to create a new pull request

type PullRequest

type PullRequest interface {
	Status() PullRequestStatus
	String() string
}

PullRequest represents a pull request

type PullRequestStatus

type PullRequestStatus int

PullRequestStatus is the status of a pull request, including statuses of the last commit

const (
	PullRequestStatusUnknown PullRequestStatus = iota
	PullRequestStatusSuccess
	PullRequestStatusPending
	PullRequestStatusError
	PullRequestStatusMerged
	PullRequestStatusClosed
)

All PullRequestStatuses

func (PullRequestStatus) String

func (s PullRequestStatus) String() string

type Repository

type Repository interface {
	URL(token string) string
	DefaultBranch() string
	// Returns the full id of the repository, usually ownerName/repoName
	FullName() string
}

Repository contains all information about a git repository

Jump to

Keyboard shortcuts

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