diff options
author | Ethan Koenig <ethantkoenig@gmail.com> | 2017-08-17 00:22:08 -0700 |
---|---|---|
committer | Lunny Xiao <xiaolunwen@gmail.com> | 2017-08-17 15:22:08 +0800 |
commit | 7907786040100593831bce1d583bb5f6e34c1a16 (patch) | |
tree | 9f1615d398e2e54a9203e9c1c6adbc7d80c80e48 /routers | |
parent | 951fb572a769acc965ec74b7152334e55b26de80 (diff) | |
download | gitea-7907786040100593831bce1d583bb5f6e34c1a16.tar.gz gitea-7907786040100593831bce1d583bb5f6e34c1a16.zip |
Trigger sync webhooks on UI commit (#2302)
* Trigger sync webhooks on UI commit
* Also fix UI upload/delete
Diffstat (limited to 'routers')
-rw-r--r-- | routers/private/push_update.go | 15 |
1 files changed, 1 insertions, 14 deletions
diff --git a/routers/private/push_update.go b/routers/private/push_update.go index 3008ef0e7a..988d273344 100644 --- a/routers/private/push_update.go +++ b/routers/private/push_update.go @@ -32,15 +32,7 @@ func PushUpdate(ctx *macaron.Context) { return } - repo, err := models.PushUpdate(opt) - if err != nil { - ctx.JSON(500, map[string]interface{}{ - "err": err.Error(), - }) - return - } - - pusher, err := models.GetUserByID(opt.PusherID) + err := models.PushUpdate(branch, opt) if err != nil { if models.IsErrUserNotExist(err) { ctx.Error(404) @@ -51,10 +43,5 @@ func PushUpdate(ctx *macaron.Context) { } return } - - log.Trace("TriggerTask '%s/%s' by %s", repo.Name, branch, pusher.Name) - - go models.HookQueue.Add(repo.ID) - go models.AddTestPullRequestTask(pusher, repo.ID, branch, true) ctx.Status(202) } |