Last active
August 17, 2018 14:59
-
-
Save mblanchard/7bc14ed8f0414c484490c3697c398f33 to your computer and use it in GitHub Desktop.
Finding recent commits for standup
This file contains 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
# Finds commits made in the last day by a particular author, using `git log` | |
# Expects `git` in the path | |
# Can be run from repo or directory of repos | |
# Handling of recursion depth and identifying repos could be improved | |
# See Git docs for '--since' and '--pretty' format: https://git-scm.com/docs/git-log | |
Param( | |
[string]$user, | |
[string]$sinceDate = "yesterday.midnight" | |
) | |
Get-ChildItem \*\*\*,\*\*,\* -directory -Hidden .git | % { | |
$logOutput = (git -C $_.fullname shortlog --date=local --since=$sinceDate --author=$user) | Out-String | |
if ($logOutput){ | |
echo "`n"$_.fullname; | |
git -C $_.fullname log --date=local --since=$sinceDate --author=$user --pretty=format:" %C(magenta)%ar %Cgreen%s" | |
} | |
} -EA SilentlyContinue |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment