Skip to content

Instantly share code, notes, and snippets.

@steve-ross
Last active March 9, 2017 18:12
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save steve-ross/c1180d0d523ffd6dd9190dc04752c24b to your computer and use it in GitHub Desktop.
Save steve-ross/c1180d0d523ffd6dd9190dc04752c24b to your computer and use it in GitHub Desktop.
Fish plugin to open the issue number for your git branch on github (if your branch is named) my-feature-branch#123 where #123 is your ticket number
function _git_branch_issue_number
echo (git symbolic-ref HEAD ^/dev/null | sed -e 's/.*#//')
end
function hub-browse-issue
set -l issue_number (_git_branch_issue_number)
hub browse -- issues/$issue_number
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment