The collaborator plugin reads the current permissions from the dict of booleans permissions and regenerates the permission string from it. But this logic only support 3 of the 5 built-in roles.
What is actually happening
This leads to safe-settings performing unnecessary updates when it processes repositories with collaborators that have the maintain role, for instance.
What is the expected behavior
All 5 built-in roles should be supported so that safe-setting only performs updates of collaboration permissions when necessary.
If it is exposed to the application, it would be preferable to read the permission field returned by GitHub directly. This would support all roles, including custom ones.
Problem Description
The collaborator plugin reads the current permissions from the dict of booleans
permissions
and regenerates thepermission
string from it. But this logic only support 3 of the 5 built-in roles.What is actually happening
This leads to safe-settings performing unnecessary updates when it processes repositories with collaborators that have the
maintain
role, for instance.What is the expected behavior
All 5 built-in roles should be supported so that safe-setting only performs updates of collaboration permissions when necessary.
If it is exposed to the application, it would be preferable to read the permission field returned by GitHub directly. This would support all roles, including custom ones.