How to Quickly Check Contents of Pull Requests Before Merging with on Windows with GitHub CLI

  1. Lists the description of a Pull Request
  2. Prints out the actual changes that were done
  3. Prompts of the actual merge should be done

1. NOTES

  • Add this to your $profile
function mpr($pr_number) {
$pr_number | % {
Write-Host "—— THE DWARVES ARE CHECKING A PR DIFFs ——" -ForegroundColor Darkblue -BackgroundColor DarkYellow
Write-Host "—— VIEW ——" -ForegroundColor DarkCyan
gh pr view $_
Pause
Write-Host "—— DIFFs ——" -ForegroundColor DarkCyan
gh pr diff $_
Pause
Write-Host "—— MERGE ——" -ForegroundColor DarkCyan
gh pr merge $_
}
}
  • Navigate to the repo in terminal
  • run mpr <PR#>

2. LINKS

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Pavol Kutaj

Pavol Kutaj

63 Followers

Infrastructure Support Engineer/Technical Writer (snowplow.io) with a passion for Python/writing documentation. More about me: https://pavol.kutaj.com