bb6edb2eed
Backport #30674 & #30679 by @lunny When visiting a pull request files which head repository has been deleted, it will panic because headrepo is nil. --------- Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>