Skip to content

Distinguish deploy keys in Protected branches/tags API

Jiovanni Castillo requested to merge j.castillo-master-patch-52933 into master

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 the access_level_description field
  • Exposing the deploy_key_id field

Screenshots or screen recordings

Protected branches

Before After
image image

Protected tags

Before After
image image

How to set up and validate locally

  1. Create a project deploy key and grant write permissions
  2. Allow the deploy key to push to a protected branch
  3. Call the Protected branches API and observe the response
  4. Allow the deploy key to create protected tags
  5. 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.

Customer reports

Reported by customers in support tickets(Zendesk internal links):

Edited by Jiovanni Castillo

Merge request reports