diff --git a/modules/context/api.go b/modules/context/api.go index a367597e8a..58532b883d 100644 --- a/modules/context/api.go +++ b/modules/context/api.go @@ -340,6 +340,7 @@ func RepoRefForAPI(next http.Handler) http.Handler { return } ctx.Repo.Commit = commit + ctx.Repo.CommitID = ctx.Repo.Commit.ID.String() ctx.Repo.TreePath = ctx.Params("*") next.ServeHTTP(w, req) return