1
0
mirror of https://github.com/woodpecker-ci/woodpecker.git synced 2024-11-30 08:06:52 +02:00

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