Last active
January 9, 2017 16:26
-
-
Save dpbackes/d2240c1713caa97c05568914b6af1085 to your computer and use it in GitHub Desktop.
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
function Review-PullRequest { | |
param( | |
[Parameter(Mandatory=$false)] | |
[string]$Number | |
) | |
Invoke-Expression "git fetch origin" | |
Invoke-Expression "git fetch origin refs/pull/$Number/head --" | |
$commits = Invoke-Expression "git rev-list origin/master..FETCH_HEAD --" | |
[array]::Reverse($commits) | |
foreach($commit in $commits) | |
{ | |
Write-Output "Now reviewing $commit" | |
Invoke-Expression "git log --format=%B -n 1 $commit" | |
Invoke-Expression "git difftool -y --dir-diff $commit^!" | |
$key = Read-Host -Prompt "Continue? Enter 'q' to quit" | |
if ($key -eq "q") | |
{ | |
return | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment