Skip to content

Expose null deploy_key_id fields in REST API

Joe Woodward requested to merge chore/always-display-deploy-key-id-field into master

What does this MR do and why?

Resolves: Follow-up from "Distinguish deploy keys in Prot... (#417581 - closed)

Expose null deploy_key_id fields in REST API

Prior to this change we only returned the field if a value was present. This is bad practice as it forces clients to detect if the field exists or not before being able to process the response.

Changelog: added

Screenshots or screen recordings

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.

Edited by Joe Woodward

Merge request reports