event

package
v0.0.0-...-2b87efa Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2016 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LastEvent

func LastEvent(events []*github.IssueEvent, matcher Matcher, deflt *time.Time) *time.Time

LastEvent returns the creation date of the last event that matches. Or deflt if there is no such event.

Types

type Actor

type Actor string

Actor searches for a specific actor

func (Actor) Match

func (a Actor) Match(event *github.IssueEvent) bool

Match if the event is from the specified actor

type AddLabel

type AddLabel struct{}

AddLabel searches for "labeled" event.

func (AddLabel) Match

func (a AddLabel) Match(event *github.IssueEvent) bool

Match if the event is of type "labeled"

type And

type And []Matcher

And makes sure that each match in the list matches (true if empty)

func (And) Match

func (a And) Match(event *github.IssueEvent) bool

Match returns true if all the matcher in the list matches

type CreatedAfter

type CreatedAfter time.Time

CreatedAfter looks for event created after time

func (CreatedAfter) Match

func (c CreatedAfter) Match(event *github.IssueEvent) bool

Match if the event is after the time

type CreatedBefore

type CreatedBefore time.Time

CreatedBefore looks for event created before time

func (CreatedBefore) Match

func (c CreatedBefore) Match(event *github.IssueEvent) bool

Match if the event is before the time

type False

type False struct{}

False is a matcher that is always false

func (False) Match

func (t False) Match(event *github.IssueEvent) bool

Match returns false no matter what

type FilteredEvents

type FilteredEvents []*github.IssueEvent

FilteredEvents is a list of events

func FilterEvents

func FilterEvents(events []*github.IssueEvent, matcher Matcher) FilteredEvents

FilterEvents will return the list of matching events

func (FilteredEvents) Empty

func (f FilteredEvents) Empty() bool

Empty Checks to see if the list of events is empty

func (FilteredEvents) GetLast

func (f FilteredEvents) GetLast() *github.IssueEvent

GetLast returns the last event in a series of events

type LabelName

type LabelName string

LabelName searches for event whose label starts with the string

func (LabelName) Match

func (l LabelName) Match(event *github.IssueEvent) bool

Match if the label is exactly provided string

type LabelPrefix

type LabelPrefix string

LabelPrefix searches for event whose label starts with the string

func (LabelPrefix) Match

func (l LabelPrefix) Match(event *github.IssueEvent) bool

Match if the label starts with the string

type Matcher

type Matcher interface {
	Match(event *github.IssueEvent) bool
}

Matcher is an interface to match an event

func BotActor

func BotActor() Matcher

BotActor returns a matcher that checks if the event was done by either of the Bots

func HumanActor

func HumanActor() Matcher

HumanActor returns a matcher that checks if the event was done by a Human (Not a Bot)

func JenkinsBotActor

func JenkinsBotActor() Matcher

JenkinsBotActor returns a matcher that checks if the event was completed by JenkinsBot

func MungeBotActor

func MungeBotActor() Matcher

MungeBotActor returns a matcher that checks if the event was completed by MungeBot

type Not

type Not struct {
	Matcher Matcher
}

Not reverses the effect of the matcher

func (Not) Match

func (n Not) Match(event *github.IssueEvent) bool

Match returns true if the matcher would return false, and vice-versa

type Or

type Or []Matcher

Or makes sure that at least one element in the list matches (false if empty)

func (Or) Match

func (o Or) Match(event *github.IssueEvent) bool

Match returns true if one of the matcher in the list matches

type RemoveLabel

type RemoveLabel struct{}

RemoveLabel searches for "unlabeled" event.

func (RemoveLabel) Match

func (r RemoveLabel) Match(event *github.IssueEvent) bool

Match if the event is of type "unlabeled"

type True

type True struct{}

True is a matcher that is always true

func (True) Match

func (t True) Match(event *github.IssueEvent) bool

Match returns true no matter what

Jump to

Keyboard shortcuts

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