_, forcePush = opts.GitPushOptions["force-push"]
objectFormat, _ := gitRepo.GetObjectFormat()
+ pusher, err := user_model.GetUserByID(ctx, opts.UserID)
+ if err != nil {
+ return nil, fmt.Errorf("Failed to get user. Error: %w", err)
+ }
+
for i := range opts.OldCommitIDs {
if opts.NewCommitIDs[i] == objectFormat.EmptyObjectID().String() {
results = append(results, private.HookProcReceiveRefResult{
description = opts.GitPushOptions["description"]
}
- pusher, err := user_model.GetUserByID(ctx, opts.UserID)
- if err != nil {
- return nil, fmt.Errorf("Failed to get user. Error: %w", err)
- }
-
prIssue := &issues_model.Issue{
RepoID: repo.ID,
Title: title,