Documentation ¶
Index ¶
- Variables
- func Add(client *github.Client, event github.IssueCommentEvent) error
- func AddLabelsToPR(ctx context.Context, prEvent github.PullRequestEvent, client *github.Client, ...) error
- func GetLabelsMap(comment string) map[string]string
- func GetListOfAddLabels(mapOfAddLabels map[string]string, listofRepoLabels []*github.Label, ...) []string
- func GetListOfRemoveLabels(mapOfRemoveLabels map[string]string, listofIssueLabels []*github.Label) []string
- func Handle(client *github.Client, event github.IssueCommentEvent) error
- func HandlePRLabels(ctx context.Context, prEvent github.PullRequestEvent, client *github.Client) error
- func Remove(client *github.Client, event github.IssueCommentEvent) error
- func RemoveLabelsToPR(ctx context.Context, prEvent github.PullRequestEvent, client *github.Client, ...) error
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // regular expression to add label RegAddLabel = regexp.MustCompile(`(?mi)^/(kind|priority)\s*(.*)$`) // regular expression to remove label RegRemoveLabel = regexp.MustCompile(`(?mi)^/remove-(kind|priority)\s*(.*)$`) )
Functions ¶
func AddLabelsToPR ¶
func AddLabelsToPR(ctx context.Context, prEvent github.PullRequestEvent, client *github.Client, addLable string) error
AddLabelsToPR function to add label to the PR
func GetLabelsMap ¶
getLabelsMap for add or remove labels
func GetListOfAddLabels ¶
func GetListOfAddLabels(mapOfAddLabels map[string]string, listofRepoLabels []*github.Label, listofIssueLabels []*github.Label) []string
getListOfAddLabels return the exact list of add labels
func GetListOfRemoveLabels ¶
func GetListOfRemoveLabels(mapOfRemoveLabels map[string]string, listofIssueLabels []*github.Label) []string
getListOfRemoveLabels return the exact list of remove labels
func Handle ¶
func Handle(client *github.Client, event github.IssueCommentEvent) error
Handle event with label
func HandlePRLabels ¶
func HandlePRLabels(ctx context.Context, prEvent github.PullRequestEvent, client *github.Client) error
HandlePRLabels function to handle add or remove label to the PR
func Remove ¶
func Remove(client *github.Client, event github.IssueCommentEvent) error
remove labels
func RemoveLabelsToPR ¶
func RemoveLabelsToPR(ctx context.Context, prEvent github.PullRequestEvent, client *github.Client, addLable string) error
RemoveLabelsToPR function to remove label to the PR
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.