Documentation
¶
Index ¶
- Constants
- type ColorConverter
- type GhRemote
- func (r *GhRemote) DeleteLabels(url *domain.GitURL, labels domain.LabelSet) error
- func (r *GhRemote) EnsureLabels(url *domain.GitURL, labels domain.LabelSet) error
- func (r *GhRemote) EnsurePullRequest(url *domain.GitURL, pr *domain.PullRequest) error
- func (r *GhRemote) FetchLabels(url *domain.GitURL) (domain.LabelSet, error)
- func (r *GhRemote) FindPullRequest(url *domain.GitURL, _, commitBranch string) (*domain.PullRequest, error)
- func (r *GhRemote) HasSupportFor(url *domain.GitURL) bool
- type LabelConverter
- type LabelSetConverter
- type PrConverter
Constants ¶
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(factory logging.LoggerFactory) *GhRemote
NewRemote returns a new GitHub provider instance.
func (*GhRemote) DeleteLabels ¶
DeleteLabels implements githosting.Remote.
func (*GhRemote) EnsureLabels ¶
EnsureLabels implements githosting.Remote.
func (*GhRemote) EnsurePullRequest ¶
func (*GhRemote) FetchLabels ¶
FetchLabels implements githosting.Remote.
func (*GhRemote) FindPullRequest ¶
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.