sympy / sympy-bot

GitHub bot for SymPy
https://github.com/sympy-bot
Other
22 stars 11 forks source link

Warn on new or deleted files #75

Open asmeurer opened 4 years ago

asmeurer commented 4 years ago

If a commit introduces a new file or deletes a file, we could have the bot warn about it. That way people will notice issues like https://github.com/sympy/sympy/pull/18488. We could also make it fail in such cases, unless someone with push access whitelists the files somehow, e.g., by mentioning the bot and listing the files. CC @oscarbenjamin

asmeurer commented 4 years ago

Here is a proof-of-concept. https://github.com/sympy/sympy-bot/pull/77

For now it just posts a comment, like https://github.com/asmeurer/GitHub-Issues-Test/pull/44#issuecomment-586520029, but we could easily make it post a failing status and require someone with push access to @mention the bot to whitelist the files.

oscarbenjamin commented 4 years ago

I think this is definitely a good idea. It would be better to try this out for a while before having it fail the PR.

oscarbenjamin commented 4 years ago

I've merged the PR. I guess we can leave this open for now until we're sure we're happy with it. Looks like this issue will get notified every time the bot posts though...

asmeurer commented 4 years ago

Yeah, I noticed that. But I think it's useful because it can make it easy to find all the instances of this. It looks like there are already a few so far, but all are intended file additions.

asmeurer commented 4 years ago

This needs to be fixed to skip merge commits. See https://github.com/sympy/sympy/pull/18681

asmeurer commented 4 years ago

https://github.com/sympy/sympy-bot/pull/81