summaryrefslogtreecommitdiffstats
path: root/modules/private
diff options
context:
space:
mode:
authorzeripath <art27@cantab.net>2019-08-14 10:25:05 +0100
committerLauris BH <lauris@nix.lv>2019-08-14 12:25:05 +0300
commitdef84840dbce6d725618e1aeab4ca1f665600087 (patch)
treeb8e73be1d7a182103c0ebf6f02392295d31aa737 /modules/private
parent7eed11e5e9855324dd328a99133bf1f668076f80 (diff)
downloadgitea-def84840dbce6d725618e1aeab4ca1f665600087.tar.gz
gitea-def84840dbce6d725618e1aeab4ca1f665600087.zip
Attempt to fix hook problem (#7854)
Diffstat (limited to 'modules/private')
-rw-r--r--modules/private/hook.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/modules/private/hook.go b/modules/private/hook.go
index caa3819555..67496b5132 100644
--- a/modules/private/hook.go
+++ b/modules/private/hook.go
@@ -29,12 +29,13 @@ type HookOptions struct {
UserName string
GitObjectDirectory string
GitAlternativeObjectDirectories string
+ GitQuarantinePath string
ProtectedBranchID int64
}
// HookPreReceive check whether the provided commits are allowed
func HookPreReceive(ownerName, repoName string, opts HookOptions) (int, string) {
- reqURL := setting.LocalURL + fmt.Sprintf("api/internal/hook/pre-receive/%s/%s?old=%s&new=%s&ref=%s&userID=%d&gitObjectDirectory=%s&gitAlternativeObjectDirectories=%s&prID=%d",
+ reqURL := setting.LocalURL + fmt.Sprintf("api/internal/hook/pre-receive/%s/%s?old=%s&new=%s&ref=%s&userID=%d&gitObjectDirectory=%s&gitAlternativeObjectDirectories=%s&gitQuarantinePath=%s&prID=%d",
url.PathEscape(ownerName),
url.PathEscape(repoName),
url.QueryEscape(opts.OldCommitID),
@@ -43,6 +44,7 @@ func HookPreReceive(ownerName, repoName string, opts HookOptions) (int, string)
opts.UserID,
url.QueryEscape(opts.GitObjectDirectory),
url.QueryEscape(opts.GitAlternativeObjectDirectories),
+ url.QueryEscape(opts.GitQuarantinePath),
opts.ProtectedBranchID,
)