diff options
author | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2017-09-04 12:13:11 +0200 |
---|---|---|
committer | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2017-09-04 12:13:11 +0200 |
commit | e23e86953de26b1681cbde5b3847e631e5ae7c74 (patch) | |
tree | c3067628d883780839f4c294b2156b66885a32b3 /lib/api/commit_statuses.rb | |
parent | 339a1ad011f87fa969fd5ba644c504518924771a (diff) | |
parent | ebbbc7ef52fbd1d3339e2e21be967d313a074a28 (diff) | |
download | gitlab-ce-e23e86953de26b1681cbde5b3847e631e5ae7c74.tar.gz |
Merge branch 'master' into feature/gb/kubernetes-only-pipeline-jobs
* master: (469 commits)
Diffstat (limited to 'lib/api/commit_statuses.rb')
-rw-r--r-- | lib/api/commit_statuses.rb | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/api/commit_statuses.rb b/lib/api/commit_statuses.rb index 485b680cd5f..6314ea63197 100644 --- a/lib/api/commit_statuses.rb +++ b/lib/api/commit_statuses.rb @@ -5,7 +5,7 @@ module API params do requires :id, type: String, desc: 'The ID of a project' end - resource :projects, requirements: { id: %r{[^/]+} } do + resource :projects, requirements: API::PROJECT_ENDPOINT_REQUIREMENTS do include PaginationParams before { authenticate! } @@ -74,7 +74,8 @@ module API source: :external, sha: commit.sha, ref: ref, - user: current_user) + user: current_user, + protected: @project.protected_for?(ref)) end status = GenericCommitStatus.running_or_pending.find_or_initialize_by( @@ -82,7 +83,8 @@ module API pipeline: pipeline, name: name, ref: ref, - user: current_user + user: current_user, + protected: @project.protected_for?(ref) ) optional_attributes = |