Skip to content

Commit

Permalink
[scripts] ,gh-issue-url: add script to copy issue url to clipboard
Browse files Browse the repository at this point in the history
  • Loading branch information
meain committed Jan 9, 2024
1 parent 99e6560 commit 5ce854a
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions scripts/.local/bin/random/,gh-issue-url
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/bin/sh

set -e

pr="$(gh issue list --assignee "@me" | tail -n+3 |
fzf --header "Issue" --preview "gh issue view {1}" | awk '{print $1}')"

git remote get-url origin |
head -c-1 | # remove newline
sed "s|^[email protected]:|https://github.com/|;s|\.git$|/issues/$pr|" |
tee /dev/stderr | pbcopy

0 comments on commit 5ce854a

Please sign in to comment.