Improve OGP (#8637)

* Improve OGP
* Ensure Repo is loaded when checking Pull info

Signed-off-by: jolheiser <john.olheiser@gmail.com>
This commit is contained in:
John Olheiser 2019-10-23 12:54:13 -05:00 committed by zeripath
parent dbd9d8dd54
commit 3e61a9628c
2 changed files with 21 additions and 7 deletions

View file

@ -242,6 +242,10 @@ func checkPullInfo(ctx *context.Context) *models.Issue {
ctx.ServerError("LoadPoster", err)
return nil
}
if err := issue.LoadRepo(); err != nil {
ctx.ServerError("LoadRepo", err)
return nil
}
ctx.Data["Title"] = fmt.Sprintf("#%d - %s", issue.Index, issue.Title)
ctx.Data["Issue"] = issue