mirror of
https://gitcode.com/gitea/gitea.git
synced 2025-06-24 22:15:01 +08: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