Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Label ¶
type Label struct { ID int64 `yaml:",omitempty"` Name string `yaml:",omitempty"` Color string `yaml:",omitempty"` Desc string `yaml:",omitempty"` }
Label represents a GitHub label.
func (*Label) Apply ¶
func (label *Label) Apply(diff LabelPatch)
Apply modifies the Label with data from the diff.
type LabelPatch ¶
LabelPatch represents a preset Label.
func (LabelPatch) Match ¶
func (patch LabelPatch) Match(with Label) int
Match calculates score from comparing with Label.
type LabelPreset ¶
type LabelPreset struct { Name string Labels []LabelPatch `yaml:",omitempty"` }
LabelPreset represents a specific set of labels.
func (*LabelPreset) ExtractMatched ¶
func (set *LabelPreset) ExtractMatched(target Label) LabelPatch
ExtractMatched founds the most appropriate LabelPatch for the specified Label.
type LabelSet ¶
LabelSet represents a GitHub repository set of labels.
type Remote ¶
Remote represents a connection to a remote GitHub repository.
func (Remote) OwnerAndName ¶
OwnerAndName returns an owner and repository name.
type Repository ¶
Repository represents a GitHub repository.
type SortLabelsByName ¶
type SortLabelsByName LabelSet
SortLabelsByName allows to sort labels by name instead of ID by default.
func (SortLabelsByName) Len ¶
func (set SortLabelsByName) Len() int
func (SortLabelsByName) Less ¶
func (set SortLabelsByName) Less(i, j int) bool
func (SortLabelsByName) Swap ¶
func (set SortLabelsByName) Swap(i, j int)
Click to show internal directories.
Click to hide internal directories.