mirror of
https://github.com/go-gitea/gitea.git
synced 2025-10-31 21:28:11 +09:00
Avoid sending "0 new commits" webhook
Signed-off-by: Till Faelligen <tfaelligen@gmail.com>
This commit is contained in:
@@ -189,6 +189,10 @@ func getSlackReleasePayload(p *api.ReleasePayload, slack *SlackMeta) (*SlackPayl
|
||||
}
|
||||
|
||||
func getSlackPushPayload(p *api.PushPayload, slack *SlackMeta) (*SlackPayload, error) {
|
||||
if len(p.Commits) == 0 {
|
||||
return nil, fmt.Errorf("no commits in payload")
|
||||
}
|
||||
|
||||
// n new commits
|
||||
var (
|
||||
commitDesc string
|
||||
|
||||
Reference in New Issue
Block a user