Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var FilteringFlag = cli.StringSliceFlag{
Name: filterFlagName,
Usage: "filter based on item attributes",
}
FilteringFlag is the command-line flag that gets automatically added to every available operation.
Functions ¶
This section is empty.
Types ¶
type AssignedFilter ¶
type AssignedFilter struct {
// contains filtered or unexported fields
}
AssignedFilter filters issues based on whether they are assigned or not.
func (AssignedFilter) ApplyIssue ¶
func (f AssignedFilter) ApplyIssue(issue *github.Issue) bool
ApplyIssue applies the filter to the specified issue.
type CommentsFilter ¶
type CommentsFilter struct {
// contains filtered or unexported fields
}
CommentsFilter filters issues based on the number of comments.
func (CommentsFilter) ApplyIssue ¶
func (f CommentsFilter) ApplyIssue(issue *github.Issue) bool
ApplyIssue applies the filter to the specified issue.
func (CommentsFilter) ApplyPullRequest ¶
func (f CommentsFilter) ApplyPullRequest(pullRequest *github.PullRequest) bool
ApplyPullRequest applies the filter to the specified pull request.
type ExtDuration ¶
ExtDuration is an extension of time.Duration to support units longer than hours.
func ParseExtDuration ¶
func ParseExtDuration(value string) (ExtDuration, error)
ParseExtDuration parses an ExtDuration from a string.
func (ExtDuration) Duration ¶
func (e ExtDuration) Duration() time.Duration
Duration returns the value as a time.Duration.
func (ExtDuration) String ¶
func (e ExtDuration) String() string
String returns a string representation of the ExtDuration.
type Filter ¶
type Filter struct {
Strategy interface{}
}
Filter accepts or rejects a GitHub item based on a strategy.
func MakeFilter ¶
MakeFilter creates a filter from a type identifier and a string value.
func ParseCliFilters ¶
ParseCliFilters reads filter definitions from the command line.
type Filters ¶
type Filters []*Filter
Filters is a collection of Filter instances.
func ParseConfigurationFilters ¶
ParseConfigurationFilters reads filter definitions from the serialized configuration format.
type IsFilter ¶
type IsFilter struct {
PullRequestOnly bool
}
IsFilter filters issues and pull requests based on their type.
func (IsFilter) ApplyIssue ¶
ApplyIssue applies the filter to the specified issue.
func (IsFilter) ApplyPullRequest ¶
func (f IsFilter) ApplyPullRequest(pullRequest *github.PullRequest) bool
ApplyPullRequest applies the filter to the specified pull request.
type MultiValuedKeys ¶
MultiValuedKeys represents a dictionary where each key can have multiple values. This is represented:
In the CLI using a StringSliceFlag such as: `--param key=val1,val2,val3`
In the configuration file using a dictionary of lists, such as `param: { key: [ val1, val2, val3 ] }`
func NewMultiValuedKeys ¶
func NewMultiValuedKeys() MultiValuedKeys
NewMultiValuedKeys returns an empty MultiValuedKeys.
func NewMultiValuedKeysFromSlice ¶
func NewMultiValuedKeysFromSlice(collection []string) (MultiValuedKeys, error)
NewMultiValuedKeysFromSlice reads a MultiValuedKeys from a collection of formatted strings, as typically provided through the command line.
func (MultiValuedKeys) ForEach ¶
func (m MultiValuedKeys) ForEach(fn func(key, value string) error) error
ForEach calls the provided `fn` function for each key-value pair.
func (MultiValuedKeys) ToSerializedFormat ¶
func (m MultiValuedKeys) ToSerializedFormat() map[string]interface{}
ToSerializedFormat transforms a MultiValuedKeys into its serialized representation, where single values are represented by a string rather than a slice of length 1.
type WithLabelsFilter ¶
type WithLabelsFilter struct {
// contains filtered or unexported fields
}
WithLabelsFilter filters issues based on whether they bear all of the specified labels.
func (WithLabelsFilter) ApplyIssue ¶
func (f WithLabelsFilter) ApplyIssue(issue *github.Issue) bool
ApplyIssue applies the filter to the specified issue.
type WithoutLabelsFilter ¶
type WithoutLabelsFilter struct {
// contains filtered or unexported fields
}
WithoutLabelsFilter filters issues based on whether they bear none of the specified labels.
func (WithoutLabelsFilter) ApplyIssue ¶
func (f WithoutLabelsFilter) ApplyIssue(issue *github.Issue) bool
ApplyIssue applies the filter to the specified issue.