mirror of
https://github.com/go-gitea/gitea
synced 2025-07-22 18:28:37 +00:00
handle initial commit for compareUrl
This commit is contained in:
@@ -72,9 +72,14 @@ func getSlackPushPayload(p *Payload, slack *Slack) (*SlackPayload, error) {
|
||||
|
||||
if len(p.Commits) == 1 {
|
||||
commitString = "1 new commit"
|
||||
if p.CompareUrl != "" {
|
||||
commitString = SlackLinkFormatter(p.CompareUrl, commitString)
|
||||
}
|
||||
} else {
|
||||
commitString = fmt.Sprintf("%d new commits", len(p.Commits))
|
||||
commitString = SlackLinkFormatter(p.CompareUrl, commitString)
|
||||
if p.CompareUrl != "" {
|
||||
commitString = SlackLinkFormatter(p.CompareUrl, commitString)
|
||||
}
|
||||
}
|
||||
|
||||
repoLink := SlackLinkFormatter(p.Repo.Url, p.Repo.Name)
|
||||
|
Reference in New Issue
Block a user