github

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Dec 7, 2021 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const ProviderKey githosting.RemoteProvider = "github"

ProviderKey is the identifier for the GitHub githosting.RemoteProvider.

Variables

This section is empty.

Functions

This section is empty.

Types

type ColorConverter

type ColorConverter struct{}

func (ColorConverter) ConvertFromEntity

func (ColorConverter) ConvertFromEntity(color domain.Color) string

func (ColorConverter) ConvertToEntity

func (ColorConverter) ConvertToEntity(color string) domain.Color

type GhRemote

type GhRemote struct {
	// contains filtered or unexported fields
}

GhRemote contains the methods and data to interact with the GitHub API.

func NewRemote

func NewRemote(instrumentation *GitHubInstrumentation) *GhRemote

NewRemote returns a new GitHub provider instance.

func (*GhRemote) DeleteLabels

func (r *GhRemote) DeleteLabels(repository *domain.GitRepository, labels domain.LabelSet) error

DeleteLabels implements githosting.Remote.

func (*GhRemote) EnsureLabels

func (r *GhRemote) EnsureLabels(repository *domain.GitRepository, labels domain.LabelSet) error

EnsureLabels implements githosting.Remote.

func (*GhRemote) EnsurePullRequest

func (r *GhRemote) EnsurePullRequest(repository *domain.GitRepository, pr *domain.PullRequest) error

func (*GhRemote) FetchLabels

func (r *GhRemote) FetchLabels(repository *domain.GitRepository) (domain.LabelSet, error)

FetchLabels implements githosting.Remote.

func (*GhRemote) FindPullRequest

func (r *GhRemote) FindPullRequest(repository *domain.GitRepository) (*domain.PullRequest, error)

func (*GhRemote) HasSupportFor

func (r *GhRemote) HasSupportFor(url *domain.GitURL) bool

type GitHubInstrumentation

type GitHubInstrumentation struct {
	// contains filtered or unexported fields
}

GitHubInstrumentation is responsible for logging interactions with GitHub API.

func NewGitHubInstrumentation

func NewGitHubInstrumentation(factory logging.LoggerFactory) *GitHubInstrumentation

NewGitHubInstrumentation returns a new instance.

type LabelConverter

type LabelConverter struct{}

LabelConverter converts domain.Label to github.Label and vice-versa

func (LabelConverter) ConvertFromEntity

func (LabelConverter) ConvertFromEntity(label domain.Label) *github.Label

ConvertFromEntity converts the given object to another. Returns a nil if labels is empty or nil.

func (LabelConverter) ConvertToEntity

func (LabelConverter) ConvertToEntity(label *github.Label) domain.Label

ConvertToEntity converts the given object to another. Returns a non-nil empty list if labels is empty or nil.

type LabelSetConverter

type LabelSetConverter struct{}

LabelSetConverter converts domain.Label to github.Label and vice-versa

func (LabelSetConverter) ConvertFromEntity

func (LabelSetConverter) ConvertFromEntity(labels domain.LabelSet) []*github.Label

ConvertFromEntity converts the given object to another. Returns a non-nil empty list if labels is empty or nil.

func (LabelSetConverter) ConvertToEntity

func (LabelSetConverter) ConvertToEntity(labels []*github.Label) domain.LabelSet

ConvertToEntity converts the given object to another. Returns a non-nil empty list if labels is empty or nil.

type PrConverter

type PrConverter struct{}

func (PrConverter) ConvertFromEntity

func (c PrConverter) ConvertFromEntity(entity *domain.PullRequest) *github.PullRequest

ConvertFromEntity converts the given object to another. Returns a non-nil empty list if labels is empty or nil.

func (PrConverter) ConvertToEntity

func (c PrConverter) ConvertToEntity(pr *github.PullRequest) *domain.PullRequest

ConvertToEntity converts the given object to another.

Jump to

Keyboard shortcuts

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