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
This commit is contained in:
parent
fecd8f949d
commit
945f121262
10 changed files with 87 additions and 73 deletions
|
@ -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,
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue