github-community-projects / github-community-projects/safe-settings

Safe-settings reapplies collaborator maintain permissions

Open
#636 1 comment 3 reactions 0 assignees View on GitHub
bug
Dominant language
JavaScript
Stars
921
Forks
226
Avg merge
18h 3m
Merged PRs (30d)
14

Description

## Problem Description

The collaborator plugin reads the current permissions from the dict of booleans `permissions` and regenerates the `permission` string from it. But [this logic](https://github.com/github/safe-settings/blob/main-enterprise/lib/plugins/collaborators.js#L28) 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.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.