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
path: root/lib/api
diff options
context:
space:
mode:
authorLuis HGO <luishgo@gmail.com>2016-06-21 04:37:40 +0300
committerRémy Coutable <remy@rymai.me>2016-10-24 17:43:52 +0300
commitf73d83db76ae8386ad4db604efb40156593b7a7a (patch)
treebad4ae1a1efed210496c82d4242b5a9964d77e88 /lib/api
parent4a0e8f59e25a0b33e8e8cf33678688df912da8eb (diff)
Added path parameter to Commits API
Signed-off-by: Rémy Coutable <remy@rymai.me>
Diffstat (limited to 'lib/api')
-rw-r--r--lib/api/commits.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/api/commits.rb b/lib/api/commits.rb
index 617a240318a..2f2cf769481 100644
--- a/lib/api/commits.rb
+++ b/lib/api/commits.rb
@@ -19,6 +19,7 @@ module API
optional :until, type: String, desc: 'Only commits before or in this date will be returned'
optional :page, type: Integer, default: 0, desc: 'The page for pagination'
optional :per_page, type: Integer, default: 20, desc: 'The number of results per page'
+ optional :path, type: String, desc: 'The file path'
end
get ":id/repository/commits" do
# TODO remove the next line for 9.0, use DateTime type in the params block
@@ -28,6 +29,7 @@ module API
offset = params[:page] * params[:per_page]
commits = user_project.repository.commits(ref,
+ path: params[:path],
limit: params[:per_page],
offset: offset,
after: params[:since],