From 3c3b68e9f8366749bd8fc5126df35f4d73e77998 Mon Sep 17 00:00:00 2001 From: jbranchaud Date: Thu, 28 Jan 2021 13:36:49 -0600 Subject: [PATCH] Add View The PR For The Current GitHub Branch as a workflow til --- README.md | 3 ++- ...ew-the-pr-for-the-current-github-branch.md | 25 +++++++++++++++++++ 2 files changed, 27 insertions(+), 1 deletion(-) create mode 100644 workflow/view-the-pr-for-the-current-github-branch.md diff --git a/README.md b/README.md index ad9f773..bd8dd4c 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ pairing with smart people at Hashrocket. For a steady stream of TILs, [sign up for my newsletter](https://tinyletter.com/jbranchaud). -_1028 TILs and counting..._ +_1029 TILs and counting..._ --- @@ -1204,6 +1204,7 @@ _1028 TILs and counting..._ - [Set Recurring Reminders In Slack](workflow/set-recurring-reminders-in-slack.md) - [Toggle Between Stories In Storybook](workflow/toggle-between-stories-in-storybook.md) - [Update asdf Plugins With Latest Package Versions](workflow/update-asdf-plugins-with-latest-package-versions.md) +- [View The PR For The Current GitHub Branch](workflow/view-the-pr-for-the-current-github-branch.md) ## Usage diff --git a/workflow/view-the-pr-for-the-current-github-branch.md b/workflow/view-the-pr-for-the-current-github-branch.md new file mode 100644 index 0000000..6deb1e4 --- /dev/null +++ b/workflow/view-the-pr-for-the-current-github-branch.md @@ -0,0 +1,25 @@ +# View The PR For The Current GitHub Branch + +As you're working on a feature branch, you may push up an early PR to get your +work-in-progress out in public. You can then continue to work locally and push +up changes. + +If at any point in this process you want to view the PR, you can open a browser +tab, visit GitHub, and navigate a few pages to the specific PR. There is a +faster using GitHub's CLI -- [`gh`](https://cli.github.com/). + +You can view the main details of the PR for the current branch right in your +terminal with: + +```bash +$ gh pr view +``` + +You can also open up the PR for the current branch in your browser by adding in +the `--web` flag. + +```bash +$ gh pr view --web +``` + +See `gh pr --help` for more details.