aboutsummaryrefslogtreecommitdiffstats
path: root/services/pull/merge.go
diff options
context:
space:
mode:
authorJason Song <i@wolfogre.com>2022-12-27 21:12:49 +0800
committerGitHub <noreply@github.com>2022-12-27 21:12:49 +0800
commit6cf09ccab402fe84a5313e1d3e755e284ebbc845 (patch)
treeb1fad807c2a16fded8b6bda84583c421ec86230c /services/pull/merge.go
parent90237d8abd0e6479c1464ac0f32fff6a2ce4a0b4 (diff)
downloadgitea-6cf09ccab402fe84a5313e1d3e755e284ebbc845.tar.gz
gitea-6cf09ccab402fe84a5313e1d3e755e284ebbc845.zip
Use complete SHA to create and query commit status (#22244)
Fix #13485. Co-authored-by: delvh <dev.lh@web.de> Co-authored-by: Lauris BH <lauris@nix.lv> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Diffstat (limited to 'services/pull/merge.go')
-rw-r--r--services/pull/merge.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/services/pull/merge.go b/services/pull/merge.go
index 1c42c1c17b..41ba45c177 100644
--- a/services/pull/merge.go
+++ b/services/pull/merge.go
@@ -839,7 +839,7 @@ func MergedManually(pr *issues_model.PullRequest, doer *user_model.User, baseGit
return models.ErrInvalidMergeStyle{ID: pr.BaseRepo.ID, Style: repo_model.MergeStyleManuallyMerged}
}
- if len(commitID) < 40 {
+ if len(commitID) < git.SHAFullLength {
return fmt.Errorf("Wrong commit ID")
}