Get URL Of The Last Pull Request With Powershell

1. steps

  • navigate to the repo
  • run get-lastPRurl
  • you get the URL clipped

2. CODE

function get-lastPRurl {
$prn = gh pr list --state all --limit 1 --json number | ConvertFrom-Json
$prurl = gh pr view $prn.number --json url | ConvertFrom-Json
$prurl.url | clip
Write-Host $prurl.url clipped -Foregroundcolor DarkCyan
}

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

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

The Tale of Identity Graph and Identity Resolution

BRACE YOURSELF, UAT IS COMING

How to Upload a Pandas Dataframe to MongoDB

What are the Best Python Web App Frameworks for Beginners?

How to install WSO2 Identity Server

Exploring an RDF Graph Database

Row-Level Security with User-Based Filters

Skaffold: Way to deploy on Kubernetes

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

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

More from Medium

Byte Strings Are Decoded To ASCII In IO By Default In Python

Introduction To Python Part 6

Scheduling jobs in Python

Astonishing Language Translator Using the Mighty Python 3.10