Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFilipa Lacerda <filipa@gitlab.com>2017-11-07 16:18:39 +0300
committerFilipa Lacerda <filipa@gitlab.com>2017-11-07 16:18:39 +0300
commitdc1e6b436268c00bd1fdf3d15597a4656e029b95 (patch)
tree83bc100e5c80facde3971f99864fdbcdc5c536eb /app/controllers
parentad526918d360cbf5d8ab3efeb0eddf482b9e6e77 (diff)
parentbd5ea484952e3ee4c50b7ffeaa20801696222ed2 (diff)
Merge branch 'multi-file-editor-separate-commits-call' into 'master'
Multi-file editor fetch log data from a different endpoint Closes #38360 See merge request gitlab-org/gitlab-ce!15132
Diffstat (limited to 'app/controllers')
-rw-r--r--app/controllers/projects/refs_controller.rb10
1 files changed, 9 insertions, 1 deletions
diff --git a/app/controllers/projects/refs_controller.rb b/app/controllers/projects/refs_controller.rb
index 2fd015df688..2376f469213 100644
--- a/app/controllers/projects/refs_controller.rb
+++ b/app/controllers/projects/refs_controller.rb
@@ -56,9 +56,12 @@ class Projects::RefsController < Projects::ApplicationController
contents[@offset, @limit].to_a.map do |content|
file = @path ? File.join(@path, content.name) : content.name
last_commit = @repo.last_commit_for_path(@commit.id, file)
+ commit_path = project_commit_path(@project, last_commit) if last_commit
{
file_name: content.name,
- commit: last_commit
+ commit: last_commit,
+ type: content.type,
+ commit_path: commit_path
}
end
end
@@ -70,6 +73,11 @@ class Projects::RefsController < Projects::ApplicationController
respond_to do |format|
format.html { render_404 }
+ format.json do
+ response.headers["More-Logs-Url"] = @more_log_url
+
+ render json: @logs
+ end
format.js
end
end