Skip to content

A fixed set of roles is no longer appropriate for teams/add-or-update-repo-permissions-in-org #1314

Closed
@Royston-Shufflebotham-i2

Description

Schema Inaccuracy

The schema specifies that the only legal values for the permission input field for teams/add-or-update-repo-permissions-in-org are pull, push, admin, maintain, triage. This used to be true, but with the advent of custom repository role names, any name is now possible.

https://docs.github.com/en/rest/teams/teams#add-or-update-team-repository-permissions

Note the text "In addition to the enumerated values, you can also specify a custom repository role name, if the owning organization has defined any."

Expected

The permissions property for the above endpoint should be of type string instead of a specific enumeration.

(Similar changes should be made for APIs which return repo-team permissions if they're actually correct. At time of writing I can set a custom permission role but when I attempt to read it I don't get back the correct permission name.)

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