mirror of
https://github.com/wekan/wekan.git
synced 2025-09-22 01:50:48 +02:00
Added script to count lines of code changed per committer email address, because GitHub removed that feature from web UI.
Thanks to bgwines and xet7 !
This commit is contained in:
parent
8ba3a05648
commit
835e33bf09
1 changed files with 19 additions and 0 deletions
19
releases/count-lines-of-code-per-committer.sh
Executable file
19
releases/count-lines-of-code-per-committer.sh
Executable file
|
@ -0,0 +1,19 @@
|
|||
#!/bin/bash
|
||||
|
||||
# At 2024, GitHub removed feature of counting lines of code from
|
||||
# https://github.com/wekan/wekan/graphs/contributors
|
||||
# "Contributions to main, line counts have been omitted because commit count exceeds 10,000."
|
||||
#
|
||||
# This code counts lines of code per email address:
|
||||
# https://github.com/orgs/community/discussions/89886#discussioncomment-8650093
|
||||
|
||||
if [ $# -ne 1 ]
|
||||
then
|
||||
echo "Syntax to count lines of code per committer, by email address:"
|
||||
echo " ./releases/count-lines-of-code-per-committer.sh x@xet7.org"
|
||||
echo "Example result at 2024-03-08:"
|
||||
echo " added lines: 4594802, removed lines: 4416066, total lines: 178736, added:deleted ratio:1.04047"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
git log --author=$1 --pretty=tformat: --numstat | awk '{ adds += $1; subs += $2; loc += $1 - $2 } END { printf "added lines: %s, removed lines: %s, total lines: %s, added:deleted ratio:%s\n", adds, subs, loc, adds/subs }' -
|
Loading…
Add table
Add a link
Reference in a new issue