Skip to content

API error when passing empty array as selected_repository_ids in SetSelectedReposForOrgSecret #2035

@xun-guo-anzx

Description

@xun-guo-anzx

In SetSelectedReposForOrgSecret, when trying to set selected repositories for a organisation secret to empty, it returns an API error:

422 Invalid request.
"selected_repository_ids" wasn't supplied. []

I assume this is because omitempty is set for selected_repository_ids in the request data. Considering that there should be a valid use case to clear up all selected repositories for an organisation secret, omitempty will need to be removed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions