github

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: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Github

type Github struct {
	RepositoryListing
	MergeTypes []domain.MergeType
	// contains filtered or unexported fields
}

Github contain github configuration

func New

func New(token, baseURL string, repoListing RepositoryListing, mergeTypes []domain.MergeType) (*Github, error)

New create a new Github client

func (Github) ClosePullRequest added in v0.13.0

func (g Github) ClosePullRequest(ctx context.Context, pullReq domain.PullRequest) error

ClosePullRequest closes a pull request

func (Github) CreatePullRequest

func (g Github) CreatePullRequest(ctx context.Context, repo domain.Repository, newPR domain.NewPullRequest) (domain.PullRequest, error)

CreatePullRequest creates a pull request

func (Github) GetAutocompleteOrganizations added in v0.23.0

func (g Github) GetAutocompleteOrganizations(ctx context.Context, _ string) ([]string, error)

GetAutocompleteOrganizations gets organizations for autocompletion

func (Github) GetAutocompleteRepositories added in v0.23.0

func (g Github) GetAutocompleteRepositories(ctx context.Context, str string) ([]string, error)

GetAutocompleteRepositories gets repositories for autocompletion

func (Github) GetAutocompleteUsers added in v0.23.0

func (g Github) GetAutocompleteUsers(ctx context.Context, str string) ([]string, error)

GetAutocompleteUsers gets users for autocompletion

func (Github) GetPullRequestStatuses

func (g Github) GetPullRequestStatuses(ctx context.Context, branchName string) ([]domain.PullRequest, error)

GetPullRequestStatuses gets the statuses of all pull requests of with a specific branch

func (Github) GetRepositories

func (g Github) GetRepositories(ctx context.Context) ([]domain.Repository, error)

GetRepositories fetches repositories from all sources (orgs/user/specific repo)

func (Github) MergePullRequest

func (g Github) MergePullRequest(ctx context.Context, pullReq domain.PullRequest) error

MergePullRequest merges a pull request

type RepositoryListing added in v0.6.0

type RepositoryListing struct {
	Organizations []string
	Users         []string
	Repositories  []RepositoryReference
}

RepositoryListing contains information about which repositories that should be fetched

type RepositoryReference added in v0.7.0

type RepositoryReference struct {
	OwnerName string
	Name      string
}

RepositoryReference contains information to be able to reference a repository

func ParseRepositoryReference added in v0.7.0

func ParseRepositoryReference(val string) (RepositoryReference, error)

ParseRepositoryReference parses a repository reference from the format "ownerName/repoName"

Jump to

Keyboard shortcuts

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