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

Infrastructure improvement: AUTHORS bot #41

Open
cool-RR opened this issue Apr 24, 2019 · 9 comments
Open

Infrastructure improvement: AUTHORS bot #41

cool-RR opened this issue Apr 24, 2019 · 9 comments

Comments

@cool-RR
Copy link
Owner

cool-RR commented Apr 24, 2019

@bittner Here's another one you might like. I want the upkeep of the AUTHORS file to be automated, basically running:

misc/generate_authors.py > AUTHORS

It would be cool to have a bot that automatically submits pull requests whenever the AUTHORS file is different than the one generated above (i.e. we just merged a new author.) Then I could approve that pull request with a click instead of having to maintain AUTHORS manually.

@cool-RR
Copy link
Owner Author

cool-RR commented Apr 24, 2019

Actually this could even be an open-source project in its own right, if you're looking for cool projects :)

@lleontop
Copy link
Contributor

@cool-RR It seems that there is something like this here (I have never used it though): https://allcontributors.org/docs/en/bot/overview that does exactly what you are describing :)

@cool-RR
Copy link
Owner Author

cool-RR commented Apr 24, 2019 via email

@bittner
Copy link
Collaborator

bittner commented Apr 24, 2019

Bots are en vogue. Let's reflect a bit, though, what the cases are where they're meant to be used:

  • When there are external circumstances or events that infer change (e.g. updated package dependencies, security threats, customer decisions or missing activity)

In the case of authors on this very repository it is much simpler: We always have a, at least one, event on this code base that can trigger an update. Hence, instead of a bot periodically visiting the repository or working with a subscriber-comsumer model this is really just about an event triggered by GitHub, e.g. an implementation may look like:

  • typically, a check on Travis that ensures the authors are complete, and
  • adding the author shall be the contributor's duty; when the checks don't pass there's no merging of the PR. Simple as that.

But sure, yeah, I know, everyone wants bots. 🤖
And I'm the dog in the manger. Sorry! 😄

@cool-RR
Copy link
Owner Author

cool-RR commented Apr 24, 2019 via email

@bittner
Copy link
Collaborator

bittner commented Apr 24, 2019

Well, software development is about frustration, learning and a few happy moments of success.

How about a solution that looks like this?

$ tox -e authors
New author(s) added. You may now commit the updated AUTHORS file.

Does that sound like proper software development? Or more like frustration?

@cool-RR
Copy link
Owner Author

cool-RR commented Apr 24, 2019

tox -e authors is a nice addition, I'd welcome it.

I want to clarify what I meant about frustration: I mean that people will try to submit pull request and have it fail because the AUTHORS file isn't updated, and they'll have to go back and update that. This hurts the greater goal of getting people to contribute, which is more important than keeping an updated AUTHORS file.

Also consider it might be a bit tricky to generate AUTHORS before a pull request is submitted, you'll have to tweak the script to look at the pull request branch rather than master.

So right now:

  1. I support adding tox -e authors as a nice entry point to the script.
  2. I support configuring a bot to do pull requests to update the AUTHORS.

@bittner
Copy link
Collaborator

bittner commented Apr 25, 2019

An appropriate command to extract the authors information from the repository would be:

git log --format="%aN <%aE>" --reverse | sort --uniq

This wouldn't work on Windows, though, I guess. Any thoughts?

@cool-RR
Copy link
Owner Author

cool-RR commented Apr 25, 2019 via email

@cool-RR cool-RR changed the title AUTHORS bot Infrastructure improvement: AUTHORS bot Apr 27, 2019
Lo236816 added a commit to Lo236816/PySnooper that referenced this issue Jan 13, 2024
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

3 participants