diff options
| author | Rémy Coutable <remy@rymai.me> | 2017-08-16 10:27:46 +0000 |
|---|---|---|
| committer | Rémy Coutable <remy@rymai.me> | 2017-08-16 10:27:46 +0000 |
| commit | 7b68bdce15a2f02d0b55d9fd43473408858cd6b6 (patch) | |
| tree | 8430a7fc007a57398e08ebbce9a7c28fcdf33e8f /lib/api | |
| parent | 1b46a8360e0adffba79fad5730e94e333350f063 (diff) | |
| parent | 142b9ec4a0b3e5d5cbcbb2fc3b201755f0966b9f (diff) | |
| download | gitlab-ce-7b68bdce15a2f02d0b55d9fd43473408858cd6b6.tar.gz | |
Merge branch 'rs-trailingwhitespace-cop' into 'master'
Enable Layout/TrailingWhitespace cop and auto-correct offenses
See merge request !13573
Diffstat (limited to 'lib/api')
| -rw-r--r-- | lib/api/entities.rb | 2 | ||||
| -rw-r--r-- | lib/api/protected_branches.rb | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/lib/api/entities.rb b/lib/api/entities.rb index 18cd604a216..4219808fdc3 100644 --- a/lib/api/entities.rb +++ b/lib/api/entities.rb @@ -83,7 +83,7 @@ module API expose :created_at, :last_activity_at end - class Project < BasicProjectDetails + class Project < BasicProjectDetails include ::API::Helpers::RelatedResourcesHelpers expose :_links do diff --git a/lib/api/protected_branches.rb b/lib/api/protected_branches.rb index d742f2e18d0..dccf4fa27a7 100644 --- a/lib/api/protected_branches.rb +++ b/lib/api/protected_branches.rb @@ -61,7 +61,7 @@ module API service_args = [user_project, current_user, protected_branch_params] protected_branch = ::ProtectedBranches::CreateService.new(*service_args).execute - + if protected_branch.persisted? present protected_branch, with: Entities::ProtectedBranch, project: user_project else |
