Closed nitsanavni closed 1 year ago
Hi @nitsanavni
Thanks for putting your idea in.
From what I understand from this script it will retrieve all contributors from GitHub repository and then add all to the co-author file. The notable downside is lots of repos have many contributors which might be too many to select from and/or no longer a contributor. There might be duplicates in authors because of case sensitivity or different emails or typos, which could make the file messy.
The git suggest-coauthors
command is similar this by reading the local git repo and extracting the co-authors, then the user can select which users to add. A handy feature for the suggest command could be a filter flag to find contributors.
Please detail your idea further so we can better discuss it.
right :)
I should've added some more details and motivation.
The idea is to get up and running with actual collaborators as a quick-start.
Maybe it should be more interactive / or maybe rely on better stats (e.g. recent contributors, number of commits).
Would you like to discuss on a call?
iso collaborators
, there's a contributors
api too, and if we sort it by contributions
, it looks like this:
$ gh api repos/rkotze/git-mob/contributors --jq 'map({login,contributions})|sort_by(.contributions)|reverse|map(.login)|.[]' |
(xargs -L1 -I {} gh api users/{} --jq '{(.login): {email:(.email//.login+"@users.noreply.github.com") ,name}}') |
jq -s 'add'
{
"rkotze": {
"email": "richkotze@outlook.com",
"name": "Richard Kotze"
},
"dideler": {
"email": "dideler@users.noreply.github.com",
"name": "Dennis Ideler"
},
"jackbittiner": {
"email": "jackbittiner@hotmail.com",
"name": "Jack Bittiner"
},
...
}
I prefer to keep discussing this in the thread for now.
I think instead of focusing on it only from a getting started point of view, it would be more valuable to handle the idea of making it easier to add new co-authors.
The scenarios to cover would be:
I'd like to have a consistent experience when a new Git Mob user starts adding co-authors for the first time it's similar to adding co-authors in the future.
related to https://github.com/rkotze/git-mob/issues/74
if you like the idea, I'm happy to pair/mob on it :)