Replies: 1 comment 4 replies
-
I'm very open to it! I always thought of the CLI as only the first runtime for octoherd scripts. I still dream of an octoherd.dev website/app for an alternative runtime for example. So extracting a programmatic interface that then the different runtimes could use sounds great to me |
Beta Was this translation helpful? Give feedback.
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
i've been finding myself wanting to accomplish similar goals to what the cli package does, but in non-terminal contexts. i really like the convention of the octoherd script taking an octokit instance, a repo, and maybe some options, but the herd part of the equation is limited to being used within the cli. i'm wondering if there would be value in exposing some of the core herd functionality as a programmatic interface, possibly as a separate package.
i think the primary logic is essentially
cli/lib/run-script-against-repositories.js
Lines 54 to 69 in ecc8f5b
the resolve-repositories logic could make sense as another function to expose, but that feels still a bit specific to the cli context in its current form.
in addition to the non-terminal context, exposing the core logic that expects an octokit instance and the list of normalized repos could be a way to enable alternative ways to determine the list of repos and support alternative auth options for octokit.
if this were available, that programmatic interface could enable other contexts beyond being from from a terminal, but would also enable embedding into other cli implementations. maybe this cli package becomes more of a reference implementation and easy default, but the programmatic interface is the path for more complex implementations?
Beta Was this translation helpful? Give feedback.
All reactions