diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-04-14 15:15:22 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-04-14 15:15:22 +0000 |
commit | cdb41961fd2bc233d36c5b30f89d087c2efa9818 (patch) | |
tree | 9903f8054fc1f8681c670984a680b768d139a251 /app/helpers/blob_helper.rb | |
parent | 8a5138ed7d38ccff8b5ca2fe0f7bbb77f8fdaad3 (diff) | |
download | gitlab-ce-cdb41961fd2bc233d36c5b30f89d087c2efa9818.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/helpers/blob_helper.rb')
-rw-r--r-- | app/helpers/blob_helper.rb | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/app/helpers/blob_helper.rb b/app/helpers/blob_helper.rb index bb6fd6c3dad..02f69327dff 100644 --- a/app/helpers/blob_helper.rb +++ b/app/helpers/blob_helper.rb @@ -330,4 +330,17 @@ module BlobHelper @path.to_s.end_with?(Ci::Pipeline::CONFIG_EXTENSION) || @path.to_s == @project.ci_config_path_or_default end + + def vue_blob_app_data(project, blob, ref) + { + blob_path: blob.path, + project_path: project.full_path, + resource_id: project.to_global_id, + user_id: current_user.present? ? current_user.to_global_id : '', + target_branch: project.empty_repo? ? ref : @ref, + original_branch: @ref + } + end end + +BlobHelper.prepend_mod_with('BlobHelper') |