From 76e51f53ce7145f8901efe694a59777422fb4033 Mon Sep 17 00:00:00 2001 From: Samantha Ming Date: Mon, 11 Jan 2021 21:20:24 -0800 Subject: [PATCH] Prefetch pathLastCommit GraphQL with StartupJS Issue: https://gitlab.com/gitlab-org/gitlab/-/issues/293855 --- app/views/projects/show.html.haml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/views/projects/show.html.haml b/app/views/projects/show.html.haml index 5b9f868a71a83e..40faf91eadf74e 100644 --- a/app/views/projects/show.html.haml +++ b/app/views/projects/show.html.haml @@ -1,3 +1,5 @@ +- current_route_path = request.fullpath.match(/-\/tree\/[^\/]+\/(.+$)/).to_a[1] +- add_page_startup_graphql_call('repository/path_last_commit', { projectPath: @project.full_path, ref: current_ref, path: current_route_path || "" }) - @content_class = "limit-container-width" unless fluid_layout - @skip_current_level_breadcrumb = true -- GitLab