Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for Github specified roles #8

Open
RCheesley opened this issue Apr 24, 2021 · 4 comments
Open

Add support for Github specified roles #8

RCheesley opened this issue Apr 24, 2021 · 4 comments

Comments

@RCheesley
Copy link

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:

  • Read
  • Triage
  • Write
  • Maintain
  • Admin

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
Copy link
Member

tedivm commented Apr 24, 2021

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
Copy link
Author

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
Copy link
Author

@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
Copy link
Member

tedivm commented Jan 27, 2022

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants