File tree Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Original file line number Diff line number Diff line change 66 index : 2
77 head_repo_id : 1
88 base_repo_id : 1
9- head_user_name : user1
109 head_branch : branch1
1110 base_branch : master
1211 merge_base : 1234567890abcdef
2120 index : 3
2221 head_repo_id : 1
2322 base_repo_id : 1
24- head_user_name : user1
2523 head_branch : branch2
2624 base_branch : master
2725 merge_base : fedcba9876543210
3533 index : 1
3634 head_repo_id : 11
3735 base_repo_id : 10
38- head_user_name : user13
3936 head_branch : branch2
4037 base_branch : master
4138 merge_base : 0abcb056019adb83
Original file line number Diff line number Diff line change @@ -110,6 +110,10 @@ func (pr *PullRequest) LoadAttributes() error {
110110// LoadBaseRepo loads pull request base repository from database
111111func (pr * PullRequest ) LoadBaseRepo () error {
112112 if pr .BaseRepo == nil {
113+ if pr .HeadRepoID == pr .BaseRepoID && pr .HeadRepo != nil {
114+ pr .BaseRepo = pr .HeadRepo
115+ return nil
116+ }
113117 var repo Repository
114118 if has , err := x .ID (pr .BaseRepoID ).Get (& repo ); err != nil {
115119 return err
You can’t perform that action at this time.
0 commit comments