mungerutil

package
v0.0.0-...-f501505 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type IssueUsers

type IssueUsers struct {
	Assignees UserSet
	Author    UserSet // This will usually be one or zero
}

IssueUsers tracks Users involved in a github Issue

func GetIssueUsers

func GetIssueUsers(issue *github.Issue) *IssueUsers

GetIssueUsers creates a new IssueUsers object from an issue's fields

func (*IssueUsers) AllUsers

func (u *IssueUsers) AllUsers() UserSet

AllUsers return a list of unique users (both assignees and author)

type UserSet

type UserSet sets.String

UserSet is a set a of users

func GetUsers

func GetUsers(users ...*github.User) UserSet

GetUsers returns a UserSet

func (UserSet) Has

func (u UserSet) Has(user ...*github.User) bool

Has tells you if the users can be found in the set

func (UserSet) Join

func (u UserSet) Join() string

Join joins each users into a single string

func (UserSet) List

func (u UserSet) List() []string

List makes a list from the set

func (UserSet) Mention

func (u UserSet) Mention() UserSet

Mention adds @ to user in the list who don't have it yet

Jump to

Keyboard shortcuts

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