From f6e7798405ef9eb7b2936b112fd2a4ea1bab4082 Mon Sep 17 00:00:00 2001 From: yp05327 <576951401@qq.com> Date: Mon, 21 Aug 2023 16:26:10 +0900 Subject: Add link to job details and tooltip to commit status in repo list in dashboard (#26326) Tooltip: ![image](https://github.com/go-gitea/gitea/assets/18380374/237cb545-7844-424b-b995-1008eaaaedec) Link to the target job: ![image](https://github.com/go-gitea/gitea/assets/18380374/0c11a97f-6517-47f2-8773-f381488c084e) --- routers/web/repo/repo.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'routers') diff --git a/routers/web/repo/repo.go b/routers/web/repo/repo.go index 0de804dbce..4409381bc5 100644 --- a/routers/web/repo/repo.go +++ b/routers/web/repo/repo.go @@ -600,6 +600,8 @@ func SearchRepo(ctx *context.Context) { results := make([]*repo_service.WebSearchRepository, len(repos)) for i, repo := range repos { + latestCommitStatus := git_model.CalcCommitStatus(repoToItsLatestCommitStatuses[repo.ID]) + results[i] = &repo_service.WebSearchRepository{ Repository: &api.Repository{ ID: repo.ID, @@ -613,7 +615,8 @@ func SearchRepo(ctx *context.Context) { Link: repo.Link(), Internal: !repo.IsPrivate && repo.Owner.Visibility == api.VisibleTypePrivate, }, - LatestCommitStatus: git_model.CalcCommitStatus(repoToItsLatestCommitStatuses[repo.ID]), + LatestCommitStatus: latestCommitStatus, + LocaleLatestCommitStatus: latestCommitStatus.LocaleString(ctx.Locale), } } -- cgit v1.2.3