File tree 2 files changed +4
-3
lines changed
2 files changed +4
-3
lines changed Original file line number Diff line number Diff line change 6
6
index : 2
7
7
head_repo_id : 1
8
8
base_repo_id : 1
9
- head_user_name : user1
10
9
head_branch : branch1
11
10
base_branch : master
12
11
merge_base : 1234567890abcdef
21
20
index : 3
22
21
head_repo_id : 1
23
22
base_repo_id : 1
24
- head_user_name : user1
25
23
head_branch : branch2
26
24
base_branch : master
27
25
merge_base : fedcba9876543210
35
33
index : 1
36
34
head_repo_id : 11
37
35
base_repo_id : 10
38
- head_user_name : user13
39
36
head_branch : branch2
40
37
base_branch : master
41
38
merge_base : 0abcb056019adb83
Original file line number Diff line number Diff line change @@ -110,6 +110,10 @@ func (pr *PullRequest) LoadAttributes() error {
110
110
// LoadBaseRepo loads pull request base repository from database
111
111
func (pr * PullRequest ) LoadBaseRepo () error {
112
112
if pr .BaseRepo == nil {
113
+ if pr .HeadRepoID == pr .BaseRepoID && pr .HeadRepo != nil {
114
+ pr .BaseRepo = pr .HeadRepo
115
+ return nil
116
+ }
113
117
var repo Repository
114
118
if has , err := x .ID (pr .BaseRepoID ).Get (& repo ); err != nil {
115
119
return err
You can’t perform that action at this time.
0 commit comments