Documentation ¶
Index ¶
- Variables
- func DeltaSlice(base, compare []string) []string
- func ExactIssue(data []byte) (github.Issue, error)
- func ExactIssueComment(data []byte) (github.IssueComment, error)
- func ExactIssueLabels(data []byte) ([]string, error)
- func ExactPR(data []byte) (github.PullRequest, error)
- func ExtractActionType(data []byte) (string, error)
- func HasChineseChar(str string) bool
- func SliceContainsElement(input []string, data string) bool
- func SliceContainsSlice(old, new []string) bool
- func UniqueElementSlice(data []string) []string
Constants ¶
This section is empty.
Variables ¶
var BodyMatches = map[string][]string{
"kind/panic": {
"panic",
"invalid memory address or nil pointer",
},
}
BodyMatches is a map in which key is the label, and value is a slice of string which can be treated as the label.
var CIFailsComment = fmt.Sprintf( "ping @%s \n%s", "%s", CIFailsCommentSubStr, )
CIFailsComment is a string used to attach comment to CI failed PRs.
var CIFailsCommentSubStr = `` /* 250-byte string literal not displayed */
CIFailsCommentSubStr is a substring of CI failing comments
var CIFailureLable = "CI-failure"
CIFailureLable is a label which means ci failure.
var FirstCommitComment = fmt.Sprintf( "We found this is your first time to contribute to %s, @%s \n%s", "%s", "%s", FirstCommitCommentSubStr, )
FirstCommitComment is a comment used to thank a user's first contribution.
var FirstCommitCommentSubStr = `` /* 234-byte string literal not displayed */
FirstCommitCommentSubStr is a string which is substring of FirstCommitComment
var IssueDescriptionTooShort = fmt.Sprintf( "Thanks for your contribution. 🍻 @%s \n%s", "%s", IssueDescriptionTooShortSubStr, )
IssueDescriptionTooShort is a string used to construct the comment.
var IssueDescriptionTooShortSubStr = `` /* 318-byte string literal not displayed */
IssueDescriptionTooShortSubStr is a sub string used to construct the comment.
var IssueNeedP1Comment = fmt.Sprintf( "Thanks for your report, @%s \n%s", "%s", IssueNeedP1CommentSubStr, )
IssueNeedP1Comment is a string used to attach comment on P1 issue.
var IssueNeedP1CommentSubStr = `😱 This is a **priority/P1** issue which is highest.
Seems to be severe enough.
ping @%s/%s , PTAL.
`
IssueNeedP1CommentSubStr is a string used to attach comment on P1 issue.
var IssueTitleTooShort = fmt.Sprintf( "Thanks for your contribution. 🍻 @%s \n%s", "%s", IssueTitleTooShortSubStr, )
IssueTitleTooShort is a string used to construct the comment.
var IssueTitleTooShortSubStr = `` /* 215-byte string literal not displayed */
IssueTitleTooShortSubStr is a sub string used to construct the comment.
var Maintainers = []string{
"allencloud",
"yyb196",
"Ace-Tang",
"skoo87",
"sunyuan3",
"furykerry",
"WIZARD-CXY",
"skyline09",
"rudyfly",
"houqianming",
"Letty5411",
"HusterWan",
"shaloulcy",
}
Maintainers is a list of the maintainers, TODO: this part will be auto-generated according to MAINTAINERS file in repo.
var PRConflictComment = fmt.Sprintf( "ping @%s \n%s", "%s", PRConflictSubStr, )
PRConflictComment is a string used to attach comment on conflict PR.
var PRConflictLabel = "conflict/needs-rebase"
PRConflictLabel is a label which means conflict for pull request.
var PRConflictSubStr = `` /* 128-byte string literal not displayed */
PRConflictSubStr is a substring of conflict message.
var PRDescriptionTooShort = fmt.Sprintf( "Thanks for your contribution. 🍻 @%s \n%s", "%s", PRDescriptionTooShortSubStr, )
PRDescriptionTooShort is a string used to construct the comment.
var PRDescriptionTooShortSubStr = `` /* 221-byte string literal not displayed */
PRDescriptionTooShortSubStr is a sub string used to construct the comment.
var PRGapComment = fmt.Sprintf( "ping @%s \nWe found that this PR is %s %s", "%s", "%s", PRGapSubStr, )
PRGapComment is a string used to attach comment on gap PR.
var PRGapLabel = "gap/needs-rebase"
PRGapLabel is a label which means gap for pull request.
var PRGapSubStr = `` /* 133-byte string literal not displayed */
PRGapSubStr is a substring of gap message.
var PRNeedsSignOff = fmt.Sprintf( "@%s %s", "%s", PRNeedsSignOffStr, )
PRNeedsSignOff is a string used to remind user to sign off.
var PRNeedsSignOffStr = ` Thanks for your contribution. 🍻
Please sign off in each of your commits.`
PRNeedsSignOffStr is a string used to remind user to sign off.
var PRTitleTooShort = fmt.Sprintf( "Thanks for your contribution. 🍻 @%s \n%s", "%s", PRTitleTooShortSubStr, )
PRTitleTooShort is a string used to construct the comment.
var PRTitleTooShortSubStr = `` /* 214-byte string literal not displayed */
PRTitleTooShortSubStr is a sub string used to construct the comment.
var PriorityP1Label = "priority/P1"
PriorityP1Label is a lable which represent P1 priority which is highest.
var SizeLabelPrefix = "size/"
SizeLabelPrefix presents the prefix of size label name.
var TitleMatches = map[string][]string{
"areas/cli": {
"cli:",
"cli :",
"command",
"command line",
"command-line",
},
"areas/docs": {
"doc:",
"docs:",
"doc :",
"docs :",
"document",
},
"areas/log": {
"gelf",
"fluentd",
"journald",
"log",
"splunk",
"syslog",
},
"areas/images": {
"docker image",
"image-spec",
"pouch pull",
},
"areas/monitoring": {
"monitoring",
"prometheus",
"health check",
},
"areas/network": {
"cni",
"ipvlan",
"ipsec",
"macvlan",
"network",
"overlay",
"vlan",
"vxlan",
},
"areas/orchestration": {
"kubernetes",
"marathon",
"mesos",
"swarm",
"swarmkit",
},
"areas/runv": {
"runv",
},
"areas/storage": {
"csi",
"storage",
"volume",
},
"areas/test": {
"ci",
"test",
},
"areas/typo": {
"typo",
},
"kind/bug": {
"bug",
"bugfix",
"cannot",
"can not",
"can't",
"error",
"failure",
"failed to ",
"fix:",
},
"kind/design": {
"design",
},
"kind/feature": {
"feature",
},
"kind/feature-request": {
"feature request",
"feature-request",
"feature_request",
},
"kind/panic": {
"invalid memory address or nil pointer",
"panic",
},
"kind/performance": {
"performance",
},
"kind/proposal": {
"proposal",
},
"kind/question": {
"can i",
"can you",
"confusion",
"does pouch",
"how to",
"question",
"where to",
},
"kind/refactor": {
"refactor",
},
"os/windows": {
"windows",
"windows server",
".net",
},
"os/ubuntu": {
"ubuntu",
},
"os/macos": {
"macos",
"osx",
},
"os/centos": {
"centos",
},
"os/fedora": {
"fedora",
},
"os/suse": {
"suse",
},
"os/freebsd": {
"freebsd",
},
"priority/P1": {
"panic",
"invalid memory address or nil pointer",
},
"DO-NOT-MERGE": {
"do not merge",
"do-not-merge",
"don't merge",
},
"WeeklyReport": {
"weekly report",
"weeklyreport",
"weekreport",
"week report",
},
}
TitleMatches is a map in which key is the label, and value is a slice of string which can be treated as the label.
Functions ¶
func DeltaSlice ¶
DeltaSlice returns a slice which contains element in compare but out of base.
func ExactIssue ¶
ExactIssue extracts the issue from request body.
func ExactIssueComment ¶
func ExactIssueComment(data []byte) (github.IssueComment, error)
ExactIssueComment extracts the issue comment from request body.
func ExactIssueLabels ¶
ExactIssueLabels extracts the issue labels from request body.
func ExactPR ¶
func ExactPR(data []byte) (github.PullRequest, error)
ExactPR extracts the pull request from request body.
func ExtractActionType ¶
ExtractActionType extracts the action type.
func HasChineseChar ¶
HasChineseChar is function return whether str has Chinese character or not
func SliceContainsElement ¶
SliceContainsElement returns true if data is in current slice.
func SliceContainsSlice ¶
SliceContainsSlice returns true if a slice contains another one
func UniqueElementSlice ¶
UniqueElementSlice returns a slice with no element duplicated.
Types ¶
This section is empty.