Skip to content
Snippets Groups Projects
Commit d3ce7c36 authored by Fabio Huser's avatar Fabio Huser
Browse files

Expose suggestion commit message via project API

parent 1166c7c6
No related branches found
No related tags found
2 merge requests!158514Fix CodeReviewMetrics worker failure with kwargs,!21411Customizable commit messages for applied suggested changes
......@@ -335,6 +335,7 @@ class Project < BasicProjectDetails
expose :remove_source_branch_after_merge
expose :printing_merge_request_link_enabled
expose :merge_method
expose :suggestion_commit_message
expose :statistics, using: 'API::Entities::ProjectStatistics', if: -> (project, options) {
options[:statistics] && Ability.allowed?(options[:current_user], :read_statistics, project)
}
......
......@@ -46,6 +46,7 @@ module ProjectsHelpers
optional :avatar, type: File, desc: 'Avatar image for project' # rubocop:disable Scalability/FileUploads
optional :printing_merge_request_link_enabled, type: Boolean, desc: 'Show link to create/view merge request when pushing from the command line'
optional :merge_method, type: String, values: %w(ff rebase_merge merge), desc: 'The merge method used when merging merge requests'
optional :suggestion_commit_message, type: String, desc: 'The commit message used to apply merge request suggestions'
optional :initialize_with_readme, type: Boolean, desc: "Initialize a project with a README.md"
optional :ci_default_git_depth, type: Integer, desc: 'Default number of revisions for shallow cloning'
optional :auto_devops_enabled, type: Boolean, desc: 'Flag indication if Auto DevOps is enabled'
......@@ -119,6 +120,7 @@ def self.update_params_at_least_one_of
:visibility,
:wiki_access_level,
:avatar,
:suggestion_commit_message,
# TODO: remove in API v5, replaced by *_access_level
:issues_enabled,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment