Documentation
¶
Index ¶
- type Config
- type GHLabeler
- func (l *GHLabeler) CreateMissing(existing Labels, repo string)
- func (l *GHLabeler) GetLabels(repo string) Labels
- func (l *GHLabeler) RemoveAbsent(existing Labels, repo string)
- func (l *GHLabeler) SetLabels(existing Labels, repo string, removeAbsent bool)
- func (l *GHLabeler) UpdateExisting(existing Labels, repo string)
- type Labels
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
Host string `json:"host"`
Owner string `json:"owner"`
Repo string `json:"repo"`
Repos []string `json:"repos"`
Labels []*github.Label `json:"labels"`
}
Config holds the labeler configuration
func LoadConfig ¶
LoadConfig loads a JSON file from the provided file path
type GHLabeler ¶
GHLabeler is a wrapper around a github.Client used to interact with the Github label
func NewLabeler ¶
NewLabeler returns a new GHLabeler instance
func (*GHLabeler) CreateMissing ¶
CreateMissing creates any github issue labels that don't already exist
func (*GHLabeler) GetLabels ¶
GetLabels returns the list of existing labels from a specified gh repository
func (*GHLabeler) RemoveAbsent ¶
RemoveAbsent removes any labels that exist on github that aren't present in the local config file
func (*GHLabeler) SetLabels ¶
SetLabels orchestrates setting the desired state of the provided repository's github issue labels
func (*GHLabeler) UpdateExisting ¶
UpdateExisting labels in github if a label color has been changed