gitconsensus / GithubOrganizer

Github App for making Organizations easier to manage
https://organizer.gitconsensus.com/
MIT License
36 stars 11 forks source link

Add support for Github specified roles #8

Open RCheesley opened 3 years ago

RCheesley commented 3 years ago

Hi there!

When assigning teams to repos there are a specified roles that can be used:

screenshot-github com-2021 04 24-16_16_55

At the moment it seems that we only have push, pull and admin available which isn't really granular enough for large open source projects (unless there is some other setting that I am missing!)

My suggestion would be to align with the the roles that are available to have:

I found the roles being used here but I am not sure how to update them to reflect these roles (I do not have a background in development, sorry!)

tedivm commented 3 years ago

I've love to do this but unfortunately the GitHub API only exposes Read, Write, and Admin as the permissions that can be set.

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

RCheesley commented 3 years ago

Hmm, that link relates to adding projects to teams:

Adds an organization project to a team

However here: https://docs.github.com/en/rest/reference/teams#check-team-permissions-for-a-repository it makes reference to all the roles that I am referring to.

Here we are talking about assigning teams to repos: https://organizer.gitconsensus.com/#/?id=assign-teams-and-permissions

So I think that we should be using the commands that are referenced here: https://docs.github.com/en/rest/reference/teams#add-or-update-team-repository-permissions rather than the ones in the projects?

RCheesley commented 3 years ago

@tedivm just wondered if you might have a chance to take a look at this.

I think it's just a case of the wrong permissions being used (it is using the permissions for assigning teams to projects, rather than the permissions for assigning teams to repos).

They are two different sets of permissions so at the moment it doesn't seem to be usable, because there isn't the triage permission which is a pretty important one.

tedivm commented 2 years ago

Yup you're right, the endpoint here does include those other options. I should be able to add this functionality in.