change eventType for tag events from gogs

This commit is contained in:
brice 2016-09-07 08:46:42 +02:00
parent 5642e9ab3b
commit 744cf55bf5
2 changed files with 1 additions and 3 deletions

View file

@ -234,7 +234,7 @@ func (c *client) Hook(r *http.Request) (*model.Repo, *model.Build, error) {
case "push":
var push *pushHook
push, err = parsePush(r.Body)
if err == nil {
if err == nil && push.RefType != "branch" {
repo = repoFromPush(push)
build = buildFromPush(push)
}

View file

@ -78,8 +78,6 @@ func buildFromPush(hook *pushHook) *model.Build {
case hook.RefType == "tag":
eventType = model.EventTag
message = "Tag " + hook.Ref
case hook.RefType == "branch":
eventType = ""
default:
eventType = model.EventPush
message = hook.Commits[0].Message