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

Unable to add teams to a repo #216

Open
nbmha1 opened this issue May 13, 2022 · 2 comments
Open

Unable to add teams to a repo #216

nbmha1 opened this issue May 13, 2022 · 2 comments
Labels
bug Something isn't working

Comments

@nbmha1
Copy link

nbmha1 commented May 13, 2022

Problem Description

Safe Settings is able to remove teams from a repo based on configuration, but not able to add teams to a repo.

What is actually happening

^^

What is the expected behavior

The GitHub teams should be added to the repo.

Error output, if available

No errors. There is a comment in the code refering to the GitHub API. Has the endpoint changed for github.com and this is not reflected in code?

Context

We are trying to run safe-settings with suborg's settings files.

Are you using the hosted instance of probot/settings or running your own?

We are running probot in our own container.

If running your own instance, are you using it with github.com or GitHub Enterprise?

Github.com

Version of probot/settings

Latest.

Version of GitHub Enterprise

NA

@nbmha1 nbmha1 added the bug Something isn't working label May 13, 2022
@svg153
Copy link
Contributor

svg153 commented May 18, 2022

We are using safe-settings with teams and members, and we do not have any problems. But our teams do not have any space in their name.

Its usage is a bit confusing. You have to put the name of the team instead of the team_slug or the id. Example:

If you have a team: https://github.com/orgs/ORG/teams/dev and its name is "Devs", in safe-settings you have to put "Devs" instead of the team_slug, "dev" or "@org/dev".

That is, you would have to put these names:

ORG=myOrganization
gh api \
   -H "Accept: application/vnd.github.v3+json" \
   /orgs/${ORG}/teams --jq ".[].name"

@decyjphr
Copy link
Collaborator

@svg153 thanks for helping out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants