From 6cf09ccab402fe84a5313e1d3e755e284ebbc845 Mon Sep 17 00:00:00 2001 From: Jason Song Date: Tue, 27 Dec 2022 21:12:49 +0800 Subject: Use complete SHA to create and query commit status (#22244) Fix #13485. Co-authored-by: delvh Co-authored-by: Lauris BH Co-authored-by: Lunny Xiao --- services/pull/merge.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'services/pull/merge.go') 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") } -- cgit v1.2.3