summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwxiaoguang <wxiaoguang@gmail.com>2023-04-18 11:10:40 +0800
committerGitHub <noreply@github.com>2023-04-17 23:10:40 -0400
commit2979041bc5beca760d30b965e60f41a3484f55b7 (patch)
tree383a6d59d613f77f437ba23889ddbbe7371a6f42
parentf82ee300977e60a59f028fa124ae30b14f03a006 (diff)
downloadgitea-2979041bc5beca760d30b965e60f41a3484f55b7.tar.gz
gitea-2979041bc5beca760d30b965e60f41a3484f55b7.zip
Fix incorrect internal response type (#24173)
Close #24167 The endpoint "set-default-branch" returns `success`, so just decode it as `responseText`
-rw-r--r--modules/private/hook.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/modules/private/hook.go b/modules/private/hook.go
index 0563e4d80a..c0fe9ef1fb 100644
--- a/modules/private/hook.go
+++ b/modules/private/hook.go
@@ -129,7 +129,8 @@ func SetDefaultBranch(ctx context.Context, ownerName, repoName, branch string) R
url.PathEscape(branch),
)
req := newInternalRequest(ctx, reqURL, "POST")
- return requestJSONUserMsg(req, "")
+ _, extra := requestJSONResp(req, &responseText{})
+ return extra
}
// SSHLog sends ssh error log response