mirror of
https://github.com/go-gitea/gitea
synced 2025-07-22 18:28:37 +00:00
refactor some functions to support ctx as first parameter (#21878)
Co-authored-by: KN4CK3R <admin@oldschoolhack.me> Co-authored-by: Lauris BH <lauris@nix.lv>
This commit is contained in:
@@ -183,7 +183,7 @@ func HookPostReceive(ctx *gitea_context.PrivateContext) {
|
||||
baseRepo = repo
|
||||
|
||||
if repo.IsFork {
|
||||
if err := repo.GetBaseRepo(); err != nil {
|
||||
if err := repo.GetBaseRepo(ctx); err != nil {
|
||||
log.Error("Failed to get Base Repository of Forked repository: %-v Error: %v", repo, err)
|
||||
ctx.JSON(http.StatusInternalServerError, private.HookPostReceiveResult{
|
||||
Err: fmt.Sprintf("Failed to get Base Repository of Forked repository: %-v Error: %v", repo, err),
|
||||
|
Reference in New Issue
Block a user