forked from kevadesu/forgejo
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:
parent
8698458f48
commit
0a7d3ff786
145 changed files with 360 additions and 369 deletions
|
@ -115,7 +115,7 @@ func ProcReceive(ctx context.Context, repo *repo_model.Repository, gitRepo *git.
|
|||
description = opts.GitPushOptions["description"]
|
||||
}
|
||||
|
||||
pusher, err := user_model.GetUserByID(opts.UserID)
|
||||
pusher, err := user_model.GetUserByID(ctx, opts.UserID)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("Failed to get user. Error: %w", err)
|
||||
}
|
||||
|
@ -198,7 +198,7 @@ func ProcReceive(ctx context.Context, repo *repo_model.Repository, gitRepo *git.
|
|||
}
|
||||
|
||||
pull_service.AddToTaskQueue(pr)
|
||||
pusher, err := user_model.GetUserByID(opts.UserID)
|
||||
pusher, err := user_model.GetUserByID(ctx, opts.UserID)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("Failed to get user. Error: %w", err)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue