diff options
author | Bob Van Landuyt <bob@vanlanduyt.co> | 2018-03-02 09:58:00 +0100 |
---|---|---|
committer | Bob Van Landuyt <bob@vanlanduyt.co> | 2018-03-07 16:59:17 +0100 |
commit | 8b2ec23fefb469d4a8f986e140aa13e20d73e210 (patch) | |
tree | dfd71c1b7d9703a6278b77523817eeace6a9d427 /lib | |
parent | e74879280f0cbf48fa0dcf8031e711cc51c9183f (diff) | |
download | gitlab-ce-8b2ec23fefb469d4a8f986e140aa13e20d73e210.tar.gz |
Set `allow_maintainer_to_push` using the API
Diffstat (limited to 'lib')
-rw-r--r-- | lib/api/entities.rb | 1 | ||||
-rw-r--r-- | lib/api/merge_requests.rb | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/lib/api/entities.rb b/lib/api/entities.rb index 4555184095c..16147ee90c9 100644 --- a/lib/api/entities.rb +++ b/lib/api/entities.rb @@ -547,6 +547,7 @@ module API expose :discussion_locked expose :should_remove_source_branch?, as: :should_remove_source_branch expose :force_remove_source_branch?, as: :force_remove_source_branch + expose :allow_maintainer_to_push, if: -> (merge_request, _) { merge_request.for_fork? } expose :web_url do |merge_request, options| Gitlab::UrlBuilder.build(merge_request) diff --git a/lib/api/merge_requests.rb b/lib/api/merge_requests.rb index ead1bb7957b..6949e8fd2c8 100644 --- a/lib/api/merge_requests.rb +++ b/lib/api/merge_requests.rb @@ -144,6 +144,7 @@ module API optional :milestone_id, type: Integer, desc: 'The ID of a milestone to assign the merge request' optional :labels, type: String, desc: 'Comma-separated list of label names' optional :remove_source_branch, type: Boolean, desc: 'Remove source branch when merging' + optional :allow_maintainer_to_push, type: Boolean, desc: 'Wether a maintainer of the target project can push to the source project' use :optional_params_ee end |