~razzi/fish-functions

75dd225cc54dfa655c51de1f6031357b91c899d9 — Razzi Abuissa 2 months ago b4b1331
Delete issue.fish; it was an antipattern to create issues with no body.

If the issue is worth fixing it's generally worth documenting.
I'm tracking issues more on sourcehut these days anyways.

https://todo.sr.ht/~razzi/dev-env
1 files changed, 0 insertions(+), 23 deletions(-)

D functions/issue.fish
D functions/issue.fish => functions/issue.fish +0 -23
@@ 1,23 0,0 @@
function issue
    set _orig_dir $PWD
    argparse d/directory= -- $argv

    if not string-empty $_flag_directory
        if is-dir $_flag_directory && is-dir $_flag_directory/.git
            cd $_flag_directory
        else
            echo issue: $_flag_directory is not a git repository
            return 1
        end
    end

    set label_args ''
    for label in $argv
        gh label create $label 2>/dev/null
        set label_args $label_args --label $label
    end

    set title (read --prompt-str "Title: ")
    gh issue create --title "$title" (echo "$label_args" | string trim | string split ' ')
    cd $_orig_dir
end