assign

package
v0.0.0-...-0f89c28 Latest Latest
Warning

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

Go to latest
Published: Aug 21, 2019 License: Apache-2.0 Imports: 5 Imported by: 6

Documentation

Index

Constants

View Source
const (
	Assign   = "/assign"
	Unassign = "/unassign"
)

Variables

View Source
var (
	AssignRegExp = regexp.MustCompile(`(?mi)^/(un)?assign(( @?[-\w]+?)*)\s*$`)
	// ccRegexp parses and validates /cc commands, also used by blunderbuss
	CCRegExp = regexp.MustCompile(`(?mi)^/(un)?cc(( +@?[-/\w]+?)*)\s*$`)
)

Functions

func AddAssignee

func AddAssignee(ctx context.Context, prEvent github.PullRequestEvent, client *github.Client, listOfAssignees []string) error

AddAssignee function to add assignee to the PR

func AddReviewer

func AddReviewer(ctx context.Context, login, repoName string, prNum int, client *github.Client, listOfAssignees []string) error

AddReviewer function to add the reviewer to the PR

func GetMatchList

func GetMatchList(login string, matchesList [][]string) ([]string, []string)

GetMatchList to get the list of add and remove assignees

func Handle

func Handle(client *github.Client, event github.IssueCommentEvent) error

Handle event with assign

func HandlePRAssign

func HandlePRAssign(ctx context.Context, prEvent github.PullRequestEvent, client *github.Client) error

HandlePRAssign function to add assignee to the PR

func HandlePRReviewer

func HandlePRReviewer(ctx context.Context, prEvent github.PullRequestEvent, client *github.Client) error

HandlePRReviewer to handle add and remove reviewers to the PR

func RemoveAssignee

func RemoveAssignee(ctx context.Context, prEvent github.PullRequestEvent, client *github.Client, listOfAssignees []string) error

RemoveAssignee function to remove the assignee to the PR

func RemoveReviewer

func RemoveReviewer(ctx context.Context, login, repoName string, prNum int, client *github.Client, listOfAssignees []string) error

RemoveReviewer function to remove the reviewer to the PR

func ReviewerReqByComment

func ReviewerReqByComment(client *github.Client, event github.IssueCommentEvent) error

HandlePRReviewer to handle add and remove reviewers to the PR

Types

This section is empty.

Jump to

Keyboard shortcuts

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