mirror of
https://github.com/go-gitea/gitea
synced 2025-09-28 03:28:13 +00:00
Avoid sending "0 new commits" webhook
Signed-off-by: Till Faelligen <tfaelligen@gmail.com>
This commit is contained in:
@@ -196,6 +196,10 @@ func getMSTeamsForkPayload(p *api.ForkPayload) (*MSTeamsPayload, error) {
|
||||
}
|
||||
|
||||
func getMSTeamsPushPayload(p *api.PushPayload) (*MSTeamsPayload, error) {
|
||||
if len(p.Commits) == 0 {
|
||||
return nil, fmt.Errorf("no commits in payload")
|
||||
}
|
||||
|
||||
var (
|
||||
branchName = git.RefEndName(p.Ref)
|
||||
commitDesc string
|
||||
|
Reference in New Issue
Block a user