mirror of
https://github.com/go-gitea/gitea
synced 2025-07-22 18:28:37 +00:00
Add latest commit in repo viewer
This commit is contained in:
@@ -50,6 +50,13 @@ func Single(ctx *middleware.Context, params martini.Params) {
|
||||
}
|
||||
}
|
||||
|
||||
commit, err := models.GetLastestCommit(params["username"], params["reponame"])
|
||||
if err != nil {
|
||||
ctx.Handle(200, "repo.Single", err)
|
||||
return
|
||||
}
|
||||
ctx.Data["LatestCommit"] = commit
|
||||
|
||||
ctx.Data["Paths"] = Paths
|
||||
ctx.Data["Treenames"] = treenames
|
||||
ctx.Data["IsRepoToolbarSource"] = true
|
||||
|
Reference in New Issue
Block a user