Skip to content

Commit

Permalink
Merge pull request #2 from jsoref/pr-vs-issue
Browse files Browse the repository at this point in the history
PR vs issue
  • Loading branch information
Habbie committed Mar 21, 2024
2 parents 48ec928 + f7fe89b commit 546ee23
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions httplistener/templates.go
Expand Up @@ -15,8 +15,8 @@ var defaultTemplates = map[string]string{
{{range commitLimit . 3}}
• {{g .Username}} ({{.Sha|truncateSha|h}}): {{trunc .Message 150}}
{{end}}`,
"github.issue.irc": "[{{b .Repository.Name}}] {{g .Sender.Login}} {{.Action}} issue #{{.Issue.Number}}: {{.Issue.Title}} {{.Issue.HTMLURL}}",
"github.issuecomment.irc": "[{{b .Repository.Name}}] {{g .Comment.User.Login}} commented on issue #{{.Issue.Number}}: {{trunc .Comment.Body 150}} ({{.Issue.Title}}) {{.Comment.HTMLURL}}",
"github.issue.irc": "[{{b .Repository.Name}}] {{g .Sender.Login}} {{.Action}} {{if contains .Issue.HTMLURL \"/pull/\"}}PR{{else}}issue{{end}} #{{.Issue.Number}}: {{.Issue.Title}} {{.Issue.HTMLURL}}",
"github.issuecomment.irc": "[{{b .Repository.Name}}] {{g .Comment.User.Login}} commented on {{if contains .Issue.HTMLURL \"/pull/\"}}PR{{else}}issue{{end}} #{{.Issue.Number}}: {{trunc .Comment.Body 150}} ({{.Issue.Title}}) {{.Comment.HTMLURL}}",
"github.pullrequestreviewcomment.irc": "[{{b .Repository.Name}}] {{g .Comment.User.Login}} review commented on PR #{{.PullRequest.Number}}: {{trunc .Comment.Body 150}} ({{.PullRequest.Title}}) {{.Comment.HTMLURL}}",
"github.pullrequestreview.irc": "[{{b .Repository.Name}}] {{g .Sender.Login}} {{.Action}} a review on PR #{{.PullRequest.Number}}: {{trunc .Review.Body 150}} ({{.Review.State}}) ({{.PullRequest.Title}}) {{.Review.HTMLURL}}",
"github.pullrequest.irc": "[{{b .Repository.Name}}] {{g .Sender.Login}} {{.Action}} pull request #{{.PullRequest.Number}} [{{if .PullRequest.Merged}}merged{{else}}open{{end}}] (\x0303{{.PullRequest.Base.Ref}}...{{.PullRequest.Head.Ref}}\x0f): {{.PullRequest.Title}} {{.PullRequest.HTMLURL}}",
Expand Down Expand Up @@ -70,6 +70,7 @@ func parseTemplates() *template.Template {
"b": boldFormat,
"g": greyFormat,
"h": highlightFormat,
"contains": strings.Contains,
}

t := template.New("irccat")
Expand Down

0 comments on commit 546ee23

Please sign in to comment.