diff options
author | Lunny Xiao <xiaolunwen@gmail.com> | 2019-10-18 19:13:31 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-10-18 19:13:31 +0800 |
commit | 945f121262ef5a393d9530b62a82b2c141bbe21c (patch) | |
tree | 13d4d91da9a75295ee3455ff183a61c4d3fbb3ad /modules | |
parent | fecd8f949dedac0751db99dec590ff12ae56818d (diff) | |
download | gitea-945f121262ef5a393d9530b62a82b2c141bbe21c.tar.gz gitea-945f121262ef5a393d9530b62a82b2c141bbe21c.zip |
Fix bug on pull requests when transfer head repository (#8564)
* fix bug on pull requests when transfer head repository
* add migration and fix lint
* fix tests and add a cache check on LoadBaseRepo
Diffstat (limited to 'modules')
-rw-r--r-- | modules/migrations/gitea.go | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/modules/migrations/gitea.go b/modules/migrations/gitea.go index 2452a7a883..a095751c6b 100644 --- a/modules/migrations/gitea.go +++ b/modules/migrations/gitea.go @@ -579,14 +579,13 @@ func (g *GiteaLocalUploader) newPullRequest(pr *base.PullRequest) (*models.PullR } var pullRequest = models.PullRequest{ - HeadRepoID: g.repo.ID, - HeadBranch: head, - HeadUserName: g.repoOwner, - BaseRepoID: g.repo.ID, - BaseBranch: pr.Base.Ref, - MergeBase: pr.Base.SHA, - Index: pr.Number, - HasMerged: pr.Merged, + HeadRepoID: g.repo.ID, + HeadBranch: head, + BaseRepoID: g.repo.ID, + BaseBranch: pr.Base.Ref, + MergeBase: pr.Base.SHA, + Index: pr.Number, + HasMerged: pr.Merged, Issue: &issue, } |