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

Use the bot to ban/unban users #106

Closed
williamkapke opened this issue Dec 14, 2016 · 19 comments
Closed

Use the bot to ban/unban users #106

williamkapke opened this issue Dec 14, 2016 · 19 comments

Comments

@williamkapke
Copy link
Contributor

A ban.json file to be added to the moderation repo (migrate existing list) in this format:

{
  //userid-username: [ start - end, ... ]
  "1234-ghost": [ "2016-12-14 to 2017-12-14" ],
  "100934-foobarbaz": [ "2015-01-28 to 2016-01-28" ]
}

* the goal of this file is to have an extremely simple format even though it causes extra parsing for the bot
* username is there just for human convenience
To automate lifting bans; the bot will sync the file with the Org's bans once a day.

Workflow to ban a user:

  • A member of the org creates a PR to the bans.json file. This can just be a proposal for a ban and a thread to discuss.
  • Once X number of collaborators approve the PR, the bot merges it. (X to be determined by policy)
  • When the bot gets a notification that this file has been changed (for any reason), it will sync the Org's bans with the list - adding any new bans or lifting any removed/expired bans.
@williamkapke williamkapke changed the title Use the bot to ban users Use the bot to ban/unban users Dec 14, 2016
@Fishrock123
Copy link
Contributor

This requires Owner permissions IIRC.

@targos
Copy link
Member

targos commented Dec 14, 2016

I can't find a reference to user blocking in the GitHub API docs. Are you sure it's possible?

@williamkapke
Copy link
Contributor Author

williamkapke commented Dec 14, 2016

This requires Owner permissions IIRC.

... which the bot is supposed to have at this point. Does it not?

@williamkapke
Copy link
Contributor Author

@targos oooohhh... good point. Maybe this ISN'T possible :(

@Fishrock123
Copy link
Contributor

... which the bot is supposed to have at this point. Does it not?

No, the discussion was to approve that for a separate, restricted bot, no?

@williamkapke
Copy link
Contributor Author

@Fishrock123 It was completed here: #72 (comment)
... I guess that issue could be closed

@Fishrock123
Copy link
Contributor

Oh right, it turns out there are specific permissions for that. We'd have to find out if the block list is accessible by the API.

@bnoordhuis
Copy link
Member

Handing admin rights, even if scoped, to a script that runs unsupervised for most of the day gives me the willies. What are the failure modes for hostile attacks, software bugs and bad input?

@phillipj
Copy link
Member

FYI I sent a question to GitHub Support whether or not it's possible to block users via their API.

@phillipj
Copy link
Member

Hi, Phillip,

You're not missing anything -- the ability to block users is not exposed via the API currently. It's something we're considering for the future, but I can't promise when it will happen.

Thanks for expressing interest in this, and if there's anything else you'd like to see improved -- please let us know.

Cheers,
Ivan

In other words, not much the bot can do ATM.

@williamkapke
Copy link
Contributor Author

williamkapke commented Dec 16, 2016

@phillipj GAH! What a major snag to this plan! Thanks a million for asking them.

@phillipj
Copy link
Member

Closing this for now as it seems we're out of luck until GitHub exposes ban/unban via their API.

@phillipj
Copy link
Member

Re-opening this as I just got a follow up email from GitHub staff. They have added support for block/unblocking users:

And a webhook which might come in handy:

@phillipj phillipj reopened this Feb 17, 2017
@MylesBorins
Copy link
Contributor

MylesBorins commented Feb 19, 2017 via email

@phillipj
Copy link
Member

@williamkapke is this something your newly created https://github.com/williamkapke/orgbot could handle?

@williamkapke
Copy link
Contributor Author

indeed it does!

@phillipj
Copy link
Member

Oooh nice, lets close this (again) in favor of the new rockstar in town: https://github.com/williamkapke/orgbot

@williamkapke
Copy link
Contributor Author

heh, well that "rockstar" isn't getting a very positive reception (yet?):
nodejs/community-committee#22

We'll just need to wait and see if anyone changes their mind I guess.

@phillipj
Copy link
Member

Thanks for the reference, an interesting discussion I wasn't aware of.

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

No branches or pull requests

6 participants