filter

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Dec 12, 2020 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var AllPulls = func(pull *reporter.PullResult) bool {
	return true
}
View Source
var AllReviews = func(pull *reporter.PullWithReview) bool {
	return true
}
View Source
var Approved = func(pull *reporter.PullWithReview) bool {
	for _, r := range pull.Review {
		switch r.GetState() {
		case "APPROVED":
			return true
		}
	}
	return false
}

Functions

func PullFilter

func PullFilter(src <-chan *reporter.PullResult,
	pred PullPredicate) <-chan *reporter.PullResult

func ReviewFilter

func ReviewFilter(src <-chan *reporter.PullWithReview,
	pred ReviewPredicate) <-chan *reporter.PullWithReview

Types

type PullPredicate

type PullPredicate func(*reporter.PullResult) bool

func PullMergedAfter

func PullMergedAfter(t time.Time) PullPredicate

func (PullPredicate) And

func (pred PullPredicate) And(other PullPredicate) PullPredicate

type ReviewPredicate

type ReviewPredicate func(*reporter.PullWithReview) bool

func RequestedChanges

func RequestedChanges(min int) ReviewPredicate

func (ReviewPredicate) And

Jump to

Keyboard shortcuts

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