summaryrefslogtreecommitdiffstats
path: root/services/repository/push.go
diff options
context:
space:
mode:
Diffstat (limited to 'services/repository/push.go')
-rw-r--r--services/repository/push.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/services/repository/push.go b/services/repository/push.go
index bce01cb76a..f1eedb8e08 100644
--- a/services/repository/push.go
+++ b/services/repository/push.go
@@ -81,7 +81,7 @@ func pushUpdates(optsList []*repo_module.PushUpdateOptions) error {
ctx, _, finished := process.GetManager().AddContext(graceful.GetManager().HammerContext(), fmt.Sprintf("PushUpdates: %s/%s", optsList[0].RepoUserName, optsList[0].RepoName))
defer finished()
- repo, err := repo_model.GetRepositoryByOwnerAndName(optsList[0].RepoUserName, optsList[0].RepoName)
+ repo, err := repo_model.GetRepositoryByOwnerAndName(ctx, optsList[0].RepoUserName, optsList[0].RepoName)
if err != nil {
return fmt.Errorf("GetRepositoryByOwnerAndName failed: %w", err)
}
@@ -109,7 +109,7 @@ func pushUpdates(optsList []*repo_module.PushUpdateOptions) error {
if opts.IsTag() { // If is tag reference
if pusher == nil || pusher.ID != opts.PusherID {
var err error
- if pusher, err = user_model.GetUserByID(opts.PusherID); err != nil {
+ if pusher, err = user_model.GetUserByID(ctx, opts.PusherID); err != nil {
return err
}
}
@@ -149,7 +149,7 @@ func pushUpdates(optsList []*repo_module.PushUpdateOptions) error {
} else if opts.IsBranch() { // If is branch reference
if pusher == nil || pusher.ID != opts.PusherID {
var err error
- if pusher, err = user_model.GetUserByID(opts.PusherID); err != nil {
+ if pusher, err = user_model.GetUserByID(ctx, opts.PusherID); err != nil {
return err
}
}