Skip to content

Instantly share code, notes, and snippets.

@gboone gboone/commit-msg
Last active May 11, 2017

Embed
What would you like to do?
Copy Federalist preview URL on commit
#!/bin/sh
#
# A commit-msg hook to copy the federalist preview url to your clipboard after you commit.
# Note: The URL will not work until the preview site has actually generated, that doesn't happen until you `push`
#
NAME=$(git branch | grep '*' | sed 's/* //')
echo "Your federalist preview will be at https://federalist.18f.gov/preview/18F/18f.gsa.gov/$NAME/"
echo "https://federalist.fr.cloud.gov/preview/18F/18f.gsa.gov/$NAME/" | pbcopy
echo "This url has been copied to your clipboard."
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.