fldardenne / DiscordSINFBot

The Discord bot of students in Computer Science at UCLouvain
5 stars 8 forks source link

Thanks command fix ? + little readme update #23

Closed lunelis closed 2 years ago

lunelis commented 2 years ago

Thanks command fix, the git shortlog command gives the expected output on wsl but hasn't been tested on the bot yet because I can't run this command on the bot on windows (uses unix command) and I can't install node on my wsl for the moment. Little change in the readme because i found it confusing that all the commands started with ! when its actually / that is used.

obiwac commented 2 years ago

Can confirm git shortlog -s | cut -c8- works. Indeed the current command doesn't seem to show the contribution of @NovAti0n for example.

To fix the problem where fdardenne appears twice, I propose:

% git shortlog -sne | awk '!_[$NF]++' | awk '{$1=$NF=""}1' | awk '{$1=$1}1'

This rejects entries with the same email address and keeps only the username of the one which committed the most. It's a bit ugly, but it gets the job done :smile: