Skip to content

Follow-up from "Distinguish deploy keys in Protected branches/tags API"

The following discussion from !116846 (merged) should be addressed:

  • @jwoodwardgl started a discussion:

    This doesn't look right to me. Doesn't this mean we only expose the deploy_key_id field if the model has the attribute and the attribute is not null. I would have thought we'd still want to expose the field if the value is null too.

Problem

We expose deploy_key_id only if it's set. But that doesn't match the behavior of user_id and group_id fields. We display them even if they are null.

Proposal

Display deploy_key_id field even if the deploy key is not set.

Edited by Joe Woodward