A git hook that can let you fuzzy find shortcut stories to link to the commit message
Steps:
- Install dependencies (Many probably already installed)
- For ubuntu:
sudo apt install fzf jq bash curl sed grep
- For mac:
brew install bash fzf jq curl gnu-sed grep
- Anything else: Figure it out, I believe in you.
- For ubuntu:
- Get a shortcut API token from here
- Run the installation script (it will prompt for token, paste it in even if you don't see any change)
Installation script can be ran with:
bash <(curl https://raw.githubusercontent.com/haihala/shortcut-hook/main/install.sh)
After commiting, you will be prompted. If you don't want to add a link to a story, just press enter and the script exits. If you want to link, add a search query. Search should work like the shortcut UI search.
The script will send that query to shortcut and prompt you with all the stories that match. Your search term doesn't have to single out a story, it just needs to be close enough to put the desired story in the top 25.
After you select one, the link to that will be inserted to the commit message with a "Shortcut: " -prefix