utils

package
v0.1.5 Latest Latest
Warning

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

Go to latest
Published: Aug 6, 2020 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const AboutThisBot = AboutThisBotCommands

AboutThisBot contains the text of both AboutThisBotWithoutCommands and AboutThisBotCommands.

View Source
const AboutThisBotCommands = "I understand the commands that are listed [here](https://chewbacca.core.cloud.mattermost.com/command-help.html)"

AboutThisBotCommands contains the message that links to the commands the bot understand.

Variables

This section is empty.

Functions

func FormatICResponse

func FormatICResponse(ic *github.IssueComment, s string) string

FormatICResponse nicely formats a response to an issue comment.

func FormatResponse

func FormatResponse(to, message, reason string) string

FormatResponse nicely formats a response to a generic reason.

func FormatResponseRaw

func FormatResponseRaw(body, bodyURL, login, reply string) string

FormatResponseRaw nicely formats a response for one does not have an issue comment

func FormatSimpleResponse

func FormatSimpleResponse(to, message string) string

FormatSimpleResponse formats a response that does not warrant additional explanation in the details section.

func HasLabel

func HasLabel(label string, issueLabels []*github.Label) bool

HasLabel checks if label is in the label set "issueLabels".

func HasLabels

func HasLabels(labels []string, issueLabels []*github.Label) bool

HasLabels checks if all labels are in the github.label set "issueLabels".

func IsAuthor

func IsAuthor(issueUser, commentUser string) bool

IsAuthor checks if a user is the author of the issue.

func LabelsSet

func LabelsSet(labels []*github.Label) sets.String

LabelsSet create a label set based on the gihub labels to make easier the manipulation

func NormLogin

func NormLogin(login string) string

NormLogin normalizes GitHub login strings

Types

This section is empty.

Jump to

Keyboard shortcuts

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