diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-06-16 21:25:58 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-06-16 21:25:58 +0300 |
commit | a5f4bba440d7f9ea47046a0a561d49adf0a1e6d4 (patch) | |
tree | fb69158581673816a8cd895f9d352dcb3c678b1e /lib/api/commits.rb | |
parent | d16b2e8639e99961de6ddc93909f3bb5c1445ba1 (diff) |
Add latest changes from gitlab-org/gitlab@14-0-stable-eev14.0.0-rc42
Diffstat (limited to 'lib/api/commits.rb')
-rw-r--r-- | lib/api/commits.rb | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/lib/api/commits.rb b/lib/api/commits.rb index bd9f83ac24c..541a37b0abe 100644 --- a/lib/api/commits.rb +++ b/lib/api/commits.rb @@ -1,5 +1,4 @@ # frozen_string_literal: true - require 'mime/types' module API @@ -41,6 +40,7 @@ module API optional :with_stats, type: Boolean, desc: 'Stats about each commit will be added to the response' optional :first_parent, type: Boolean, desc: 'Only include the first parent of merges' optional :order, type: String, desc: 'List commits in order', default: 'default', values: %w[default topo] + optional :trailers, type: Boolean, desc: 'Parse and include Git trailers for every commit', default: false use :pagination end get ':id/repository/commits' do @@ -62,7 +62,8 @@ module API after: after, all: all, first_parent: first_parent, - order: order) + order: order, + trailers: params[:trailers]) serializer = with_stats ? Entities::CommitWithStats : Entities::Commit @@ -203,6 +204,7 @@ module API requires :sha, type: String, desc: 'A commit sha, or the name of a branch or tag to be cherry picked' requires :branch, type: String, desc: 'The name of the branch', allow_blank: false optional :dry_run, type: Boolean, default: false, desc: "Does not commit any changes" + optional :message, type: String, desc: 'A custom commit message to use for the picked commit' end post ':id/repository/commits/:sha/cherry_pick', requirements: API::COMMIT_ENDPOINT_REQUIREMENTS do authorize_push_to_branch!(params[:branch]) @@ -216,7 +218,8 @@ module API commit: commit, start_branch: params[:branch], branch_name: params[:branch], - dry_run: params[:dry_run] + dry_run: params[:dry_run], + message: params[:message] } result = ::Commits::CherryPickService |