Skip to content

Instantly share code, notes, and snippets.

@canadaduane
Created April 8, 2024 14:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save canadaduane/9faacde8a8fe220f4b52983ba68fa1a5 to your computer and use it in GitHub Desktop.
Save canadaduane/9faacde8a8fe220f4b52983ba68fa1a5 to your computer and use it in GitHub Desktop.
Reformat graphite.dev output to link to github when submitting
# 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