MCPcopy Create free account
hub / github.com/EverythingSuckz/github-telegram-notify / createPushText

Function createPushText

utils/parser.go:100–119  ·  view source on GitHub ↗
(event *types.PushEvent)

Source from the content-addressed store, hash-verified

98}
99
100func createPushText(event *types.PushEvent) string {
101 text := fmt.Sprintf("<b>🔨 %d New commit to</b> <a href='%s'>%s</a>[<code>%s</code>]\n\n",
102 len(event.Commits),
103 event.Repo.HTMLURL,
104 event.Repo.FullName,
105 strings.Replace(event.Ref, "refs/heads/", "", 1),
106 )
107
108 for _, commit := range event.Commits {
109 text += fmt.Sprintf("• <a href='%s'>%s</a> - %s by <a href='%s'>%s</a>\n",
110 commit.Url,
111 commit.Id[:7],
112 html.EscapeString(commit.Message),
113 commit.Author.HTMLURL,
114 commit.Author.Name,
115 )
116 }
117
118 return text
119}
120
121func createForkText(event *types.ForkEvent) string {
122 return fmt.Sprintf("🍴 <a href='%s'>%s</a> forked <a href='%s'>%s</a> → <a href='%s'>%s</a>",

Callers 1

CreateContentsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected