summaryrefslogtreecommitdiffstats
path: root/modules
diff options
context:
space:
mode:
authorLunny Xiao <xiaolunwen@gmail.com>2021-08-14 19:17:10 +0800
committerGitHub <noreply@github.com>2021-08-14 13:17:10 +0200
commit74d75eb69ce0ecd61665ea2ad4a971aee0305c8e (patch)
treede37a344b3a065282c42727cbb1bb572a262787e /modules
parentbbf9f41354a2ff48124231a18cdf0a26bc39235f (diff)
downloadgitea-74d75eb69ce0ecd61665ea2ad4a971aee0305c8e.tar.gz
gitea-74d75eb69ce0ecd61665ea2ad4a971aee0305c8e.zip
Fix spelling of HookProcReceiveResult (#16690)
Diffstat (limited to 'modules')
-rw-r--r--modules/private/hook.go14
1 files changed, 7 insertions, 7 deletions
diff --git a/modules/private/hook.go b/modules/private/hook.go
index 4d0b5d22bf..fd864b1e6b 100644
--- a/modules/private/hook.go
+++ b/modules/private/hook.go
@@ -81,14 +81,14 @@ type HookPostReceiveBranchResult struct {
URL string
}
-// HockProcReceiveResult represents an individual result from ProcReceive
-type HockProcReceiveResult struct {
- Results []HockProcReceiveRefResult
+// HookProcReceiveResult represents an individual result from ProcReceive
+type HookProcReceiveResult struct {
+ Results []HookProcReceiveRefResult
Err string
}
-// HockProcReceiveRefResult represents an individual result from ProcReceive
-type HockProcReceiveRefResult struct {
+// HookProcReceiveRefResult represents an individual result from ProcReceive
+type HookProcReceiveRefResult struct {
OldOID string
NewOID string
Ref string
@@ -150,7 +150,7 @@ func HookPostReceive(ctx context.Context, ownerName, repoName string, opts HookO
}
// HookProcReceive proc-receive hook
-func HookProcReceive(ctx context.Context, ownerName, repoName string, opts HookOptions) (*HockProcReceiveResult, error) {
+func HookProcReceive(ctx context.Context, ownerName, repoName string, opts HookOptions) (*HookProcReceiveResult, error) {
reqURL := setting.LocalURL + fmt.Sprintf("api/internal/hook/proc-receive/%s/%s",
url.PathEscape(ownerName),
url.PathEscape(repoName),
@@ -170,7 +170,7 @@ func HookProcReceive(ctx context.Context, ownerName, repoName string, opts HookO
if resp.StatusCode != http.StatusOK {
return nil, errors.New(decodeJSONError(resp).Err)
}
- res := &HockProcReceiveResult{}
+ res := &HookProcReceiveResult{}
_ = json.NewDecoder(resp.Body).Decode(res)
return res, nil