Created
November 14, 2019 11:33
-
-
Save eckelon/386f0b200b107b5231431fcf815c8f4a to your computer and use it in GitHub Desktop.
script for generating a markdown styled report based on the last 7 days git activity, on all the repos inside the current dir. Inspired by https://twitter.com/climagic/status/1194712444201054209?s=12
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
CUR_DIR=$(pwd) | |
GIT_USER="JA Samitier" | |
report="# Git report from last week\n" | |
printf "Generating git report...\n\n" | |
repos=$(find . -name ".git" | cut -c 3-) | |
for i in $repos; do | |
cd "$i"; | |
cd ..; | |
current_report=`git log --author="$GIT_USER" --format="- %aI %B" --since=-7days --reverse` | |
[ -z "$current_report" ] || report="${report}\n## ${i/\/\.git/}\n${current_report}\n"; | |
cd $CUR_DIR | |
done | |
printf "$report\n"; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment