summaryrefslogtreecommitdiff
path: root/lib/api/entities/protected_ref_access.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/api/entities/protected_ref_access.rb')
-rw-r--r--lib/api/entities/protected_ref_access.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/api/entities/protected_ref_access.rb b/lib/api/entities/protected_ref_access.rb
index ba28c724448..28e0ef540d5 100644
--- a/lib/api/entities/protected_ref_access.rb
+++ b/lib/api/entities/protected_ref_access.rb
@@ -9,6 +9,8 @@ module API
documentation: { type: 'string', example: 'Maintainers' } do |protected_ref_access|
protected_ref_access.humanize
end
+ expose :deploy_key_id, documentation: { type: 'integer', example: 1 },
+ if: ->(access) { access.has_attribute?(:deploy_key_id) && access.deploy_key_id }
end
end
end