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

[BUG]: Maintainer not added to the team #2353

Open
1 task done
jrwpatterson opened this issue Nov 16, 2022 · 0 comments
Open
1 task done

[BUG]: Maintainer not added to the team #2353

jrwpatterson opened this issue Nov 16, 2022 · 0 comments
Labels
Status: Triage This is being looked at and prioritized Type: Bug Something isn't working as documented

Comments

@jrwpatterson
Copy link

jrwpatterson commented Nov 16, 2022

What happened?

Hi I'm using a token where I have added every single permission. I'm using the Octokit package to create a team but for some reason the maintainer isn't being added. The docs say the maintainer should be added automatically as the owner of the token. However, in my case the team is created, the user is added automatically but only as a team member; which means that the code then can't add new users or remove the created teams as there is no maintainer so now it has to be an Org Admin manually updating it.

I have tried both of these snippets, both relying on the auto assigning a maintainer and explicitly stating a user and in both circumstances the user who's token is used is added to the team but the team has no maintainers.

With the maintainer explicitly stated

        await this.octokit.rest.teams.create({
          org: 'org',
          name: channel.teamName,
          description: channel.teamDescription,
          privacy: 'closed',
          permission: 'push',
          maintainers: ['jrwpatterson],
        })

and without

        await this.octokit.rest.teams.create({
          org: 'org',
          name: channel.teamName,
          description: channel.teamDescription,
          privacy: 'closed',
          permission: 'push',
        })

As you can see I am added to the team but for rhyme or reason I am not the maintainer and there is no maintainer.

We are hoping to sync backstage teams with github teams, and projects created in backstage have their team members automatically assigned to a team and the repo for the backstage project automatically assigned to that team in both places.

Screenshot 2022-11-17 at 8 59 39 am

To clarify I can create a team through the UI with myself as a maintainer.

Versions

Octokit v2.0.10
Node v16.18.0

Relevant log output

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct
@jrwpatterson jrwpatterson added Status: Triage This is being looked at and prioritized Type: Bug Something isn't working as documented labels Nov 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Triage This is being looked at and prioritized Type: Bug Something isn't working as documented
Projects
None yet
Development

No branches or pull requests

1 participant