Expose null deploy_key_id fields in REST API
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 |
---|---|
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.
Edited by Joe Woodward