Skip to content

Commit

Permalink
Update services/automerge/automerge.go
Browse files Browse the repository at this point in the history
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
  • Loading branch information
lunny and wxiaoguang committed May 21, 2024
1 parent 9680940 commit 894537c
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions services/automerge/automerge.go
Original file line number Diff line number Diff line change
Expand Up @@ -120,9 +120,8 @@ func StartPRCheckAndAutoMerge(ctx context.Context, pull *issues_model.PullReques
log.Error("OpenRepository: %v", err)
return
}

defer gitRepo.Close()
commitID, err := gitRepo.GetRefCommitID(pull.GetGitRefName())
gitRepo.Close()
if err != nil {
log.Error("GetRefCommitID: %v", err)
return
Expand Down

0 comments on commit 894537c

Please sign in to comment.