diff options
author | Rémy Coutable <remy@rymai.me> | 2017-06-21 09:00:57 +0000 |
---|---|---|
committer | Rémy Coutable <remy@rymai.me> | 2017-06-21 09:00:57 +0000 |
commit | 18ef5be6c4f41d671398bf754dec84ba9a897609 (patch) | |
tree | 24c58a42b56399152a6f767a1a8d5bf2406d4d2f | |
parent | 21465deef009f281c3619730e9c402d515c8f78d (diff) | |
parent | 1cd1bab3af90b55119a16d3aceeb4f993ec31e5d (diff) | |
download | gitlab-ce-18ef5be6c4f41d671398bf754dec84ba9a897609.tar.gz |
Merge branch 'dt/printing-to-api' into 'master'
add printing_merge_request_link_enabled to API
See merge request !12240
-rw-r--r-- | changelogs/unreleased/dt-printing-to-api.yml | 4 | ||||
-rw-r--r-- | doc/api/projects.md | 3 | ||||
-rw-r--r-- | lib/api/entities.rb | 1 | ||||
-rw-r--r-- | lib/api/projects.rb | 2 |
4 files changed, 10 insertions, 0 deletions
diff --git a/changelogs/unreleased/dt-printing-to-api.yml b/changelogs/unreleased/dt-printing-to-api.yml new file mode 100644 index 00000000000..5253b57f21a --- /dev/null +++ b/changelogs/unreleased/dt-printing-to-api.yml @@ -0,0 +1,4 @@ +--- +title: Added printing_merge_requst_link_enabled to the API +merge_request: +author: David Turner <dturner@twosigma.com> diff --git a/doc/api/projects.md b/doc/api/projects.md index 58f18105e21..cc1bb3911c8 100644 --- a/doc/api/projects.md +++ b/doc/api/projects.md @@ -261,6 +261,7 @@ Parameters: ], "only_allow_merge_if_pipeline_succeeds": false, "only_allow_merge_if_all_discussions_are_resolved": false, + "printing_merge_requests_link_enabled": true, "request_access_enabled": false, "statistics": { "commit_count": 37, @@ -344,6 +345,7 @@ Parameters: | `request_access_enabled` | boolean | no | Allow users to request member access | | `tag_list` | array | no | The list of tags for a project; put array of tags, that should be finally assigned to a project | | `avatar` | mixed | no | Image file for avatar of the project | +| `printing_merge_request_link_enabled` | boolean | no | Show link to create/view merge request when pushing from the command line | ### Create project for user @@ -379,6 +381,7 @@ Parameters: | `request_access_enabled` | boolean | no | Allow users to request member access | | `tag_list` | array | no | The list of tags for a project; put array of tags, that should be finally assigned to a project | | `avatar` | mixed | no | Image file for avatar of the project | +| `printing_merge_request_link_enabled` | boolean | no | Show link to create/view merge request when pushing from the command line | ### Edit project diff --git a/lib/api/entities.rb b/lib/api/entities.rb index 8bce79529e6..675bc52a983 100644 --- a/lib/api/entities.rb +++ b/lib/api/entities.rb @@ -118,6 +118,7 @@ module API expose :only_allow_merge_if_pipeline_succeeds expose :request_access_enabled expose :only_allow_merge_if_all_discussions_are_resolved + expose :printing_merge_request_link_enabled expose :statistics, using: 'API::Entities::ProjectStatistics', if: :statistics end diff --git a/lib/api/projects.rb b/lib/api/projects.rb index 50d34e8a738..c5df45b7902 100644 --- a/lib/api/projects.rb +++ b/lib/api/projects.rb @@ -23,6 +23,7 @@ module API optional :only_allow_merge_if_all_discussions_are_resolved, type: Boolean, desc: 'Only allow to merge if all discussions are resolved' optional :tag_list, type: Array[String], desc: 'The list of tags for a project' optional :avatar, type: File, desc: 'Avatar image for project' + optional :printing_merge_request_link_enabled, type: Boolean, desc: 'Show link to create/view merge request when pushing from the command line' end params :optional_params do @@ -218,6 +219,7 @@ module API :only_allow_merge_if_all_discussions_are_resolved, :only_allow_merge_if_pipeline_succeeds, :path, + :printing_merge_request_link_enabled, :public_builds, :request_access_enabled, :shared_runners_enabled, |