Skip to content

Commit 672eb10

Browse files
committed
test temp
1 parent 6394d98 commit 672eb10

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

services/agit/agit.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ func ProcReceive(ctx context.Context, repo *repo_model.Repository, gitRepo *git.
213213
return nil, fmt.Errorf("unable to load base repository for PR[%d] Error: %w", pr.ID, err)
214214
}
215215

216-
oldCommitID, err := gitRepo.GetRefCommitIDNew(pr.GetGitHeadRefName())
216+
oldCommitID, err := gitRepo.GetRefCommitIDOld(pr.GetGitHeadRefName())
217217
if err != nil {
218218
return nil, fmt.Errorf("unable to get ref commit id in base repository for PR[%d] Error: %w", pr.ID, err)
219219
}

services/convert/pull.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ func ToAPIPullRequest(ctx context.Context, pr *issues_model.PullRequest, doer *u
170170
}
171171

172172
if pr.Flow == issues_model.PullRequestFlowAGit {
173-
apiPullRequest.Head.Sha, err = gitRepo.GetRefCommitIDNew(pr.GetGitHeadRefName())
173+
apiPullRequest.Head.Sha, err = gitRepo.GetRefCommitIDOld(pr.GetGitHeadRefName())
174174
if err != nil {
175175
log.Error("GetRefCommitID[%s]: %v", pr.GetGitHeadRefName(), err)
176176
return nil
@@ -210,7 +210,7 @@ func ToAPIPullRequest(ctx context.Context, pr *issues_model.PullRequest, doer *u
210210
)
211211

212212
if !exist {
213-
headCommitID, err := headGitRepo.GetRefCommitIDNew(apiPullRequest.Head.Ref)
213+
headCommitID, err := headGitRepo.GetRefCommitIDOld(apiPullRequest.Head.Ref)
214214
if err != nil && !git.IsErrNotExist(err) {
215215
log.Error("GetCommit[%s]: %v", pr.HeadBranch, err)
216216
return nil
@@ -450,7 +450,7 @@ func ToAPIPullRequests(ctx context.Context, baseRepo *repo_model.Repository, prs
450450
if pr.Flow == issues_model.PullRequestFlowAGit {
451451
apiPullRequest.Head.Name = ""
452452
}
453-
apiPullRequest.Head.Sha, err = gitRepo.GetRefCommitIDNew(pr.GetGitHeadRefName())
453+
apiPullRequest.Head.Sha, err = gitRepo.GetRefCommitIDOld(pr.GetGitHeadRefName())
454454
if err != nil {
455455
log.Error("GetRefCommitID[%s]: %v", pr.GetGitHeadRefName(), err)
456456
}

0 commit comments

Comments
 (0)