Distinguish deploy keys in Protected branches/tags API
What does this MR do and why?
Deploy keys are currently returned as Maintainers
for the Protected branches API and Protected tags API. This makes it difficult to differentiate between a Maintainer role and a Deploy key.
This MR adds the ability to distinguish a deploy key from the Maintainer role by:
- Returning
Deploy key
for theaccess_level_description
field - Exposing the
deploy_key_id
field- This will allow a lookup against the Deploy keys API
Screenshots or screen recordings
Protected branches
Before | After |
---|---|
![]() |
![]() |
Protected tags
Before | After |
---|---|
![]() |
![]() |
How to set up and validate locally
- Create a project deploy key and grant write permissions
- Allow the deploy key to push to a protected branch
- Call the Protected branches API and observe the response
- Allow the deploy key to create protected tags
- Call the Protected tags API and observe the response
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Customer reports
Reported by customers in support tickets(Zendesk internal links):
Edited by Jio Castillo