diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-01-23 12:08:21 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-01-23 12:08:21 +0300 |
commit | 5b1258ee90fb29779d6c9da3f488ebff61e243a3 (patch) | |
tree | ff63f9b2f31759d2f20126219997c7230b5b822f /app/helpers | |
parent | 9cc33a92d0d4e79d7ca4a1e7b4400fbbdda33933 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/helpers')
-rw-r--r-- | app/helpers/projects_helper.rb | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/app/helpers/projects_helper.rb b/app/helpers/projects_helper.rb index 507e05b9967..7fd14363377 100644 --- a/app/helpers/projects_helper.rb +++ b/app/helpers/projects_helper.rb @@ -123,6 +123,25 @@ module ProjectsHelper end end + def vue_fork_divergence_data(project, ref) + source_project = visible_fork_source(project) + + return {} unless source_project + + source_default_branch = source_project.default_branch + + { + source_name: source_project.full_name, + source_path: project_path(source_project), + ahead_compare_path: project_compare_path( + project, from: source_default_branch, to: ref, from_project_id: source_project.id + ), + behind_compare_path: project_compare_path( + source_project, from: ref, to: source_default_branch, from_project_id: project.id + ) + } + end + def remove_fork_project_warning_message(project) _("You are going to remove the fork relationship from %{project_full_name}. Are you ABSOLUTELY sure?") % { project_full_name: project.full_name } |