aboutsummaryrefslogtreecommitdiffstats
path: root/services/pull/temp_repo.go
diff options
context:
space:
mode:
Diffstat (limited to 'services/pull/temp_repo.go')
-rw-r--r--services/pull/temp_repo.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/services/pull/temp_repo.go b/services/pull/temp_repo.go
index 842719467f..d49a15cea0 100644
--- a/services/pull/temp_repo.go
+++ b/services/pull/temp_repo.go
@@ -166,7 +166,7 @@ func createTemporaryRepo(ctx context.Context, pr *issues_model.PullRequest) (str
var headBranch string
if pr.Flow == issues_model.PullRequestFlowGithub {
headBranch = git.BranchPrefix + pr.HeadBranch
- } else if len(pr.HeadCommitID) == 40 { // for not created pull request
+ } else if len(pr.HeadCommitID) == git.SHAFullLength { // for not created pull request
headBranch = pr.HeadCommitID
} else {
headBranch = pr.GetGitRefName()