diff options
author | zeripath <art27@cantab.net> | 2019-08-14 10:25:05 +0100 |
---|---|---|
committer | Lauris BH <lauris@nix.lv> | 2019-08-14 12:25:05 +0300 |
commit | def84840dbce6d725618e1aeab4ca1f665600087 (patch) | |
tree | b8e73be1d7a182103c0ebf6f02392295d31aa737 /modules/private | |
parent | 7eed11e5e9855324dd328a99133bf1f668076f80 (diff) | |
download | gitea-def84840dbce6d725618e1aeab4ca1f665600087.tar.gz gitea-def84840dbce6d725618e1aeab4ca1f665600087.zip |
Attempt to fix hook problem (#7854)
Diffstat (limited to 'modules/private')
-rw-r--r-- | modules/private/hook.go | 4 |
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, ) |