Skip to content

Instantly share code, notes, and snippets.

@SeanMcGrath
Last active August 9, 2016 19:08
Show Gist options
  • Save SeanMcGrath/9ca700c8e2cd064776800b3f95ade160 to your computer and use it in GitHub Desktop.
Save SeanMcGrath/9ca700c8e2cd064776800b3f95ade160 to your computer and use it in GitHub Desktop.
Use chrome-cli to find first open jira ticket and format it for git commit
#!/bin/bash
JIRA_TABS=`chrome-cli list tabs | grep 'ENG.*Jira' | cut -d ' ' -f 1 | sed -e 's/\[//g' -e 's/\]//g'`
for tab in $JIRA_TABS; do
chrome-cli execute '(function() { return document.getElementById("key-val").textContent + " " + document.getElementById("summary-val").textContent; })();' -t $tab
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment