mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2025-06-07 09:58:51 +00:00
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":
|
case "push":
|
||||||
var push *pushHook
|
var push *pushHook
|
||||||
push, err = parsePush(r.Body)
|
push, err = parsePush(r.Body)
|
||||||
if err == nil {
|
if err == nil && push.RefType != "branch" {
|
||||||
repo = repoFromPush(push)
|
repo = repoFromPush(push)
|
||||||
build = buildFromPush(push)
|
build = buildFromPush(push)
|
||||||
}
|
}
|
||||||
|
|
|
@ -78,8 +78,6 @@ func buildFromPush(hook *pushHook) *model.Build {
|
||||||
case hook.RefType == "tag":
|
case hook.RefType == "tag":
|
||||||
eventType = model.EventTag
|
eventType = model.EventTag
|
||||||
message = "Tag " + hook.Ref
|
message = "Tag " + hook.Ref
|
||||||
case hook.RefType == "branch":
|
|
||||||
eventType = ""
|
|
||||||
default:
|
default:
|
||||||
eventType = model.EventPush
|
eventType = model.EventPush
|
||||||
message = hook.Commits[0].Message
|
message = hook.Commits[0].Message
|
||||||
|
|
Loading…
Reference in a new issue