Fix bug when creating pull request (#36166)

Extract from #36105 

Fix #36116
Fix #35912
Fix #20906
This commit is contained in:
Lunny Xiao
2025-12-17 13:21:04 -08:00
committed by GitHub
parent 1e22bd712f
commit efd5dd4f0b
7 changed files with 189 additions and 16 deletions
+1 -1
View File
@@ -259,7 +259,7 @@ func ParseCompareInfo(ctx *context.Context) *common.CompareInfo {
} else if len(headInfos) == 2 {
headInfosSplit := strings.Split(headInfos[0], "/")
if len(headInfosSplit) == 1 {
ci.HeadUser, err = user_model.GetUserByName(ctx, headInfos[0])
ci.HeadUser, err = user_model.GetUserOrOrgByName(ctx, headInfos[0])
if err != nil {
if user_model.IsErrUserNotExist(err) {
ctx.NotFound(nil)