diff options
author | Luis HGO <luishgo@gmail.com> | 2016-06-21 04:37:40 +0300 |
---|---|---|
committer | Rémy Coutable <remy@rymai.me> | 2016-10-24 17:43:52 +0300 |
commit | f73d83db76ae8386ad4db604efb40156593b7a7a (patch) | |
tree | bad4ae1a1efed210496c82d4242b5a9964d77e88 /lib/api/commits.rb | |
parent | 4a0e8f59e25a0b33e8e8cf33678688df912da8eb (diff) |
Added path parameter to Commits API
Signed-off-by: Rémy Coutable <remy@rymai.me>
Diffstat (limited to 'lib/api/commits.rb')
-rw-r--r-- | lib/api/commits.rb | 2 |
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], |