aboutsummaryrefslogtreecommitdiffstats
path: root/cmd/serve.go
diff options
context:
space:
mode:
authorUnknwon <u@gogs.io>2015-07-25 21:32:04 +0800
committerUnknwon <u@gogs.io>2015-07-25 21:32:04 +0800
commitfa298a2c30c358dbfa47fc123c6aca83fe9eb999 (patch)
tree2179828e8b7c8ebafe3121506f26d52cb0350c63 /cmd/serve.go
parent2b1442f3dfa3558f4e1a9dd5b1dbb50cf348e6e0 (diff)
downloadgitea-fa298a2c30c358dbfa47fc123c6aca83fe9eb999.tar.gz
gitea-fa298a2c30c358dbfa47fc123c6aca83fe9eb999.zip
#835: Realtime webhooks
Diffstat (limited to 'cmd/serve.go')
-rw-r--r--cmd/serve.go7
1 files changed, 7 insertions, 0 deletions
diff --git a/cmd/serve.go b/cmd/serve.go
index 3d3bb1a90c..fed65bba15 100644
--- a/cmd/serve.go
+++ b/cmd/serve.go
@@ -16,6 +16,7 @@ import (
"github.com/codegangsta/cli"
"github.com/gogits/gogs/models"
+ "github.com/gogits/gogs/modules/httplib"
"github.com/gogits/gogs/modules/log"
"github.com/gogits/gogs/modules/setting"
"github.com/gogits/gogs/modules/uuid"
@@ -193,6 +194,12 @@ func runServ(c *cli.Context) {
}
}
+ // Send deliver hook request.
+ resp, err := httplib.Head(setting.AppUrl + setting.AppSubUrl + repoUserName + "/" + repoName + "/hooks/trigger").Response()
+ if err == nil {
+ resp.Body.Close()
+ }
+
// Update key activity.
key, err := models.GetPublicKeyById(keyId)
if err != nil {