change eventType for tag events from gogs
This commit is contained in:
parent
5642e9ab3b
commit
744cf55bf5
2 changed files with 1 additions and 3 deletions
|
@ -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)
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue