From 7991a8932a4fc815cfd6f11f344c2e168e4f2d55 Mon Sep 17 00:00:00 2001 From: Jeff Storey Date: Mon, 28 Mar 2016 16:50:51 -0400 Subject: [PATCH] PR fixes --- controller/build.go | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/controller/build.go b/controller/build.go index 43f85bc8..96e7ffd4 100644 --- a/controller/build.go +++ b/controller/build.go @@ -228,11 +228,13 @@ func PostBuild(c *gin.Context) { c.String(500, err.Error()) return } - if build.Event == model.EventPush || - build.Event == model.EventPull || - build.Event == model.EventTag || - build.Event == model.EventDeploy { - build.Event = c.DefaultQuery("event", build.Event) + + event := c.DefaultQuery("event", build.Event) + if event == model.EventPush || + event == model.EventPull || + event == model.EventTag || + event == model.EventDeploy { + build.Event = event } build.Deploy = c.DefaultQuery("deploy_to", build.Deploy) }