diff options
author | yp05327 <576951401@qq.com> | 2023-08-21 16:26:10 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-08-21 15:26:10 +0800 |
commit | f6e7798405ef9eb7b2936b112fd2a4ea1bab4082 (patch) | |
tree | e4197e509e5b3f0f7a7f87f0385a6e18b76fbc4a /routers | |
parent | 3be80a863b6ef3671605a20800d8e2122d758ec5 (diff) | |
download | gitea-f6e7798405ef9eb7b2936b112fd2a4ea1bab4082.tar.gz gitea-f6e7798405ef9eb7b2936b112fd2a4ea1bab4082.zip |
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)
Diffstat (limited to 'routers')
-rw-r--r-- | routers/web/repo/repo.go | 5 |
1 files changed, 4 insertions, 1 deletions
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), } } |