diff options
author | Nihad Abbasov <narkoz.2008@gmail.com> | 2012-09-21 04:34:07 -0700 |
---|---|---|
committer | Nihad Abbasov <narkoz.2008@gmail.com> | 2012-09-21 04:34:07 -0700 |
commit | 4a072be2d775d5ce59573cfb447ddab940854d54 (patch) | |
tree | b570f8deffa0811ffe3e7369e3cc7c0b246c6b93 /lib/api/commits.rb | |
parent | 131553627d2e62cea2ea8a342250ca2d2495d8fc (diff) | |
download | gitlab-ce-4a072be2d775d5ce59573cfb447ddab940854d54.tar.gz |
API: commits belong to project repository
Diffstat (limited to 'lib/api/commits.rb')
-rw-r--r-- | lib/api/commits.rb | 29 |
1 files changed, 0 insertions, 29 deletions
diff --git a/lib/api/commits.rb b/lib/api/commits.rb deleted file mode 100644 index 47d96fc4906..00000000000 --- a/lib/api/commits.rb +++ /dev/null @@ -1,29 +0,0 @@ -module Gitlab - # Commits API - class Commits < Grape::API - before { authenticate! } - - resource :projects do - # Get a list of project commits - # - # Parameters: - # id (required) - The ID or code name of a project - # ref_name (optional) - Name of branch or tag - # page (optional) - default is 0 - # per_page (optional) - default is 20 - # Example Request: - # GET /projects/:id/commits - get ":id/commits" do - authorize! :download_code, user_project - - page = params[:page] || 0 - per_page = params[:per_page] || 20 - ref = params[:ref_name] || user_project.try(:default_branch) || 'master' - - commits = user_project.commits(ref, nil, per_page, page * per_page) - - present CommitDecorator.decorate(commits), with: Entities::Commit - end - end - end -end |