dlvhdr / gh-dash

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

Streamline custom commands #362

Closed Omnikron13 closed 1 month ago

Omnikron13 commented 1 month ago

Summary

Moved common functionality from runCustomPRCommand() & runCustomIssueCommand() into new runCustomCommand() function

How did you test this change?

Set and ran rudimentary custom commands in each context. Could probably do with some more robust testing though tbh.

I've left an empty input map still initialised in the new function, and merged in the specific data from the calls from different contexts, as I'm not sure what common data might want to be made available common to different contexts.

Omnikron13 commented 1 month ago

Following the calls back, could drop runCustomPRCommand() & runCustomIssueCommand() too I suppose, unless there's likely to be extra logic there that doesn't want to be polluting executeKeybinding().