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

bot to automate adding team members #40

Open
graingert opened this issue Sep 2, 2020 · 16 comments
Open

bot to automate adding team members #40

graingert opened this issue Sep 2, 2020 · 16 comments

Comments

@graingert
Copy link
Member

A heroku like bot to add team members

The reality we all have to accept here is that Microsoft/GitHub aren't catering their badges to open source organizations like ours. We really are abnormal to them. This is why they broke the ability for team maintainers to invite people to the team on behalf of the org. It's because organizations are really "corporations" as far as they're concerned. They won't fix that or introduce a permission for it, so it means that while I'm not the only person who can invite folks here, I'm the only one who does that work.

Originally posted by @sigmavirus24 in #39 (comment)

@graingert
Copy link
Member Author

I can contribute this, if it's desired @sigmavirus24

@sigmavirus24
Copy link
Member

So the only bots I'm aware of are ones like jazzband use which indiscriminately add people to the org. If there's a way to have it require approval from someone already in the org whose trying to do the invite, that'd be nicer. I've had people email me privately to be added to the org for their resume even though they don't work on projects and have never bothered contributing

@graingert
Copy link
Member Author

@sigmavirus24 if gitlab is better for this, then should I move PyCQA/modernize there?

@sigmavirus24
Copy link
Member

I don't recall if gitlab's any better. I'm open to automation to do this, I just have specific thoughts about how it should work. Gitlab's been making weird choices lately too that cater entirely to the 'Enterprise'

@graingert
Copy link
Member Author

If there's a way to have it require approval from someone already in the org whose trying to do the invite, that'd be nicer.

There could be a members list in this repo, and PRs to change it with upvote/downvote from existing members

@sigmavirus24
Copy link
Member

That sounds perfect

@graingert
Copy link
Member Author

graingert commented Sep 2, 2020

@sigmavirus24 I'm reminded of the github project a while ago that had a bash script that ran daily and merged any positively voted PRs. Because the script had full access to the repository API key on the default branch this effectively democratised all automation.

It rapidly descended into chaos, but it might work for invite-only

edit: https://news.ycombinator.com/item?id=14399610 here it is, it's "dead" now though

@sigmavirus24
Copy link
Member

heh. There are many bots that do stuff like that. That said, I'm not even sure upvote/downvote would need to happen so long as folks approve/merge the PR. I'm thinking team maintainers would get added to a team that can read/write on the access control repo. Means that one person sends the PR to invite someone, and another person approves and either of them merge it.

@sambhav
Copy link
Member

sambhav commented Sep 2, 2020

There's https://probot.github.io/apps/settings/ which maybe relevant.

@sigmavirus24
Copy link
Member

There's https://probot.github.io/apps/settings/ which maybe relevant.

That seems to focus on per-repository configuration. I've built GitHub Apps in the past, it shouldn't be too terrible to do this. I just don't have the time to do it.

@graingert
Copy link
Member Author

something like this, but the opposite: https://probot.github.io/apps/remove-outside-collaborators/

@graingert
Copy link
Member Author

@sigmavirus24 I think this is a good fit: https://github.com/erickzhao/invite-contributors

It will invite anyone who gets a PR merged into a pycqa repository to the pycqa org

it's a bit of a looser than my proposal but fits this part of the spec:

've had people email me privately to be added to the org for their resume even though they don't work on projects and have never bothered contributing

@graingert
Copy link
Member Author

I'm not sure what permissions a user in the organization but not in any teams has, I think it's None, and they get a neat badge on their profile

@sambhav
Copy link
Member

sambhav commented Sep 3, 2020

@sigmavirus24 I think this is a good fit: https://github.com/erickzhao/invite-contributors

It will invite anyone who gets a PR merged into a pycqa repository to the pycqa org

it's a bit of a looser than my proposal but fits this part of the spec:

've had people email me privately to be added to the org for their resume even though they don't work on projects and have never bothered contributing

This could actually work to automate adding people to the org. However, it means that each team will have its corresponding repository (for eg a repository called team-pydocstyle-dev with the appropriate .github/invite-contributors.yml) and PRs to the repository can be something like adding your name to the Readme and it should only be merged in if we want to invite them to the team. It would've been great if this worked on some folder level and we could instead use the meta repo to manage this. I don't think it will be a lot of trouble to adapt this bot to do this and I can take a shot at it this weekend.

@graingert
Copy link
Member Author

I have permission to add org users to teams

@webknjaz
Copy link

Related: this is the bot that powers the @python-trio org — https://github.com/python-trio/snekomatic. Nathaniel made it like 5+ years ago. It is made to auto-invite people right when their first contributions are merged.

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

4 participants