Skip to content

Instantly share code, notes, and snippets.

@jhonnymoreira
Last active May 27, 2025 23:35
Show Gist options
  • Save jhonnymoreira/3be5d0f26dcc78c62020d081e3c3cb59 to your computer and use it in GitHub Desktop.
Save jhonnymoreira/3be5d0f26dcc78c62020d081e3c3cb59 to your computer and use it in GitHub Desktop.
Get current branch Pull Request URL using GitHub CLI and fx
#!/usr/bin/env bash
gh pr view --json url | fx .url
@jhonnymoreira
Copy link
Author

jhonnymoreira commented May 27, 2025

Requirements

How to install

  • Download the script
  • chmod +x /path/to/get-pr-url
  • sudo ln -s /path/to/get-pr-url /usr/local/bin/get-pr-url

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment