mirror of
https://github.com/go-gitea/gitea.git
synced 2026-10-07 16:27:00 +02:00
fix pulls broken when fork repository deleted (#6754)
* fix pulls broken when fork repository deleted * fix lint
This commit is contained in:
1 parent
ec2d489d15
commit
4c34bc111c
3 files changed
+28
-1
No files matched your search
@@ -299,6 +299,10 @@ func (pr *PullRequest) GetLastCommitStatus() (status *CommitStatus, err error) {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
if pr.HeadRepo == nil {
|
||||
return nil, ErrPullRequestHeadRepoMissing{pr.ID, pr.HeadRepoID}
|
||||
}
|
||||
|
||||
headGitRepo, err := git.OpenRepository(pr.HeadRepo.RepoPath())
|
||||
if err != nil {
|
||||
return nil, err
|
||||
|
||||
Reference in new issue
Block a user