domain

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jun 25, 2020 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

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"
)

Constant errors

func (Error) Error

func (e Error) Error() string

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 struct {
	OwnerName  string
	RepoName   string
	BranchName string
	Number     int
	Status     PullRequestStatus
}

PullRequest represents a pull request

func (PullRequest) FullRepoName added in v0.2.0

func (p PullRequest) FullRepoName() string

FullRepoName returns the full repository name including the owner

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 struct {
	URL           string
	Name          string
	OwnerName     string
	DefaultBranch string
}

Repository contains all information about a git repository

func (Repository) FullName added in v0.2.0

func (r Repository) FullName() string

FullName returns the full repository name including the owner

Jump to

Keyboard shortcuts

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