Created
April 8, 2024 14:51
-
-
Save canadaduane/9faacde8a8fe220f4b52983ba68fa1a5 to your computer and use it in GitHub Desktop.
Reformat graphite.dev output to link to github when submitting
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
# Normally, graphite wants to point you to their website after you submit a stack. I don't use their website, and I | |
# would prefer to go directly to the github PR. I wrote an alias that uses `unbuffer` to keep all of the nice ansi color | |
# and formatting, while replacing the final URL displayed with a github URL. | |
# | |
# Install unbuffer: | |
# - Mac OS: `brew install expect` | |
# - Ubuntu Linux: `sudo apt install expect` | |
# | |
# I have this in my .zshrc; "gts" is short for "gt submit": | |
alias gts="unbuffer -p gt submit --no-interactive --no-edit --no-web --publish | sed 's/app.graphite.dev\/github\/pr\/SchoolAI\/web-app/github.com\/SchoolAI\/web-app\/pull/'" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
If you want a more generic regex, this should work for any user / repo