Skip to content

RemoveReviewers API: omitempty on required reviewers field causes spurious 422s #3336

@nagl-resourcely

Description

@nagl-resourcely

Summary

Calling RemoveReviewers when you want to only remove teams elicits a 422, due to how omitempty prevents the golang client from serializing the empty reviewers slice. This field is required on the server, so the golang client needed to send reviewers: [].

Workaround

Work around this by exploiting delete idempotency =) Just pass it a bogus username alongside real team slugs.

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