dlvhdr / gh-dash

A beautiful CLI dashboard for GitHub 🚀
https://dlvhdr.github.io/gh-dash
MIT License
6.77k stars 191 forks source link

[BUG] Unable to use keybindings on pull request without having the repo pulled down? #353

Open venkatamutyala opened 3 months ago

venkatamutyala commented 3 months ago

Describe the bug Using custom keybindings to preform actions extermally

To Reproduce Steps to reproduce the behavior:

  1. I add a custom key binding that like so: keybindings: issues: [] prs:

    • key: e command: > echo "Hello" > test.txt

    and when the binding it says "Failed to find the local path for the repo ...

Expected behavior I expected it to just echo "Hello" to disk. I didn't expect to have the actual repo cloned down in order to be able to run external commands.

Screenshots N/A

Desktop (please complete the following information):

dlvhdr commented 3 months ago

Seems simple to solve, care to contribute it? Also, what's your use case?

venkatamutyala commented 3 months ago

@dlvhdr I'd be happy to try. I'm relatively new to golang so I'll probably need a few pointers.

My use case is I'd like to be able to use gh-dash to manage all open pull requests, irrespective of having a repo cloned down. As for the command I would like to run, I want to have a keyboard shortcut that let's me approve a PR.

Omnikron13 commented 2 months ago

https://github.com/dlvhdr/gh-dash/blob/94c660311ddd0b2e063f520e027b4096e1e84666/ui/modelUtils.go#L112-L118

@venkatamutyala Over-zealous error check here, I believe. Exits out early without actually knowing or caring if the template being Executed needs the local path.