From 60d0ed58d06c66d9ef3eda31af152fe0324b3603 Mon Sep 17 00:00:00 2001 From: Ben Chang Date: Thu, 12 Dec 2024 10:07:13 +0800 Subject: [PATCH 1/4] Add "n commits" link to contributors in contributors graph page --- routers/web/repo/contributors.go | 3 +++ web_src/js/components/RepoContributors.vue | 16 ++++++++++++++-- 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/routers/web/repo/contributors.go b/routers/web/repo/contributors.go index 762fbf93795f3..b05f4b2cb2f3c 100644 --- a/routers/web/repo/contributors.go +++ b/routers/web/repo/contributors.go @@ -21,6 +21,9 @@ func Contributors(ctx *context.Context) { ctx.Data["Title"] = ctx.Tr("repo.activity.navbar.contributors") ctx.Data["PageIsActivity"] = true ctx.Data["PageIsContributors"] = true + ctx.PageData["repoContributorsData"] = map[string]any{ + "repoDefaultBranch": ctx.Repo.RefName, + } ctx.HTML(http.StatusOK, tplContributors) } diff --git a/web_src/js/components/RepoContributors.vue b/web_src/js/components/RepoContributors.vue index 97678b9a13b0d..6915518e4be1b 100644 --- a/web_src/js/components/RepoContributors.vue +++ b/web_src/js/components/RepoContributors.vue @@ -1,5 +1,6 @@