Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Display pull request head branch even the branch deleted or repository deleted #10413

Merged
merged 7 commits into from
Mar 2, 2020
Prev Previous commit
Next Next commit
Ensure MustHeadRepoName returns empty string if no head repo
  • Loading branch information
zeripath committed Mar 2, 2020
commit b30e0938a95f58660c6cc34f49232748a06145ba
3 changes: 3 additions & 0 deletions models/pull.go
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,9 @@ func (pr *PullRequest) MustHeadUserName() string {
}
return ""
}
if pr.HeadRepo == nil {
return ""
}
return pr.HeadRepo.OwnerName
}

Expand Down