Skip to content
GitLab
Next
Menu
Why GitLab
Pricing
Contact Sales
Explore
Why GitLab
Pricing
Contact Sales
Explore
Sign in
Get free trial
Primary navigation
Search or go to…
Project
GitLab
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Privacy statement
Keyboard shortcuts
?
What's new
4
Snippets
Groups
Projects
Show more breadcrumbs
GitLab.org
GitLab
Commits
d3ce7c36
Commit
d3ce7c36
authored
5 years ago
by
Fabio Huser
Browse files
Options
Downloads
Patches
Plain Diff
Expose suggestion commit message via project API
parent
1166c7c6
No related branches found
No related tags found
2 merge requests
!158514
Fix CodeReviewMetrics worker failure with kwargs
,
!21411
Customizable commit messages for applied suggested changes
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
lib/api/entities.rb
+1
-0
1 addition, 0 deletions
lib/api/entities.rb
lib/api/helpers/projects_helpers.rb
+2
-0
2 additions, 0 deletions
lib/api/helpers/projects_helpers.rb
with
3 additions
and
0 deletions
lib/api/entities.rb
+
1
−
0
View file @
d3ce7c36
...
...
@@ -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
)
}
...
...
This diff is collapsed.
Click to expand it.
lib/api/helpers/projects_helpers.rb
+
2
−
0
View file @
d3ce7c36
...
...
@@ -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
,
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment