mirror of
https://gitcode.com/gitea/gitea.git
synced 2025-06-02 18:17:09 +08:00
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>
This commit is contained in:
@ -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")
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user