diff options
author | Unknwon <u@gogs.io> | 2015-10-05 09:46:00 -0400 |
---|---|---|
committer | Unknwon <u@gogs.io> | 2015-10-05 09:46:00 -0400 |
commit | db00aa7653937ce62d1ffa37661e50ea4bee80cd (patch) | |
tree | fa217490c8ea9a84ed0d9e2a795dad018e17df6e /cmd/serve.go | |
parent | 215920772ab8d84418e982ee1de8986f911fe3c1 (diff) | |
download | gitea-db00aa7653937ce62d1ffa37661e50ea4bee80cd.tar.gz gitea-db00aa7653937ce62d1ffa37661e50ea4bee80cd.zip |
add log for trigger hook when push through SSH
Diffstat (limited to 'cmd/serve.go')
-rw-r--r-- | cmd/serve.go | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/cmd/serve.go b/cmd/serve.go index 57677704c6..34ebe9fbd1 100644 --- a/cmd/serve.go +++ b/cmd/serve.go @@ -219,9 +219,13 @@ func runServ(c *cli.Context) { } // Send deliver hook request. - resp, err := httplib.Head(setting.AppUrl + setting.AppSubUrl + repoUserName + "/" + repoName + "/hooks/trigger").Response() + reqURL := setting.AppUrl + repoUserName + "/" + repoName + "/hooks/trigger" + resp, err := httplib.Head(reqURL).Response() if err == nil { resp.Body.Close() + log.GitLogger.Trace("Trigger hook: %s", reqURL) + } else { + log.GitLogger.Error(2, "Fail to trigger hook: %v", err) } // Update user key activity. |