Creating a gh
CLI extension for creating GitHub Discussions via category forms

As part of getting ready for my new job at Mend this week, working on Renovate, I've been thinking a little bit about my workflow.
One of the choices the Renovate maintainers made a couple of years ago was that Q&A/feature requests should come through the GitHub Discussions on the project, then will be "promoted" into an Issue that then will get addressed after a level of triage.
I'm a big fan of this, as well as the fact that the project is using Discussion category forms to provide a structured set of inputs for reports from users, which guides them through the information needed.
This is something I'd fairly recently taken onboard to streamline some internal processes at Elastic using these Discussion category forms, and found them to be very beneficial.
However, one thing I've found is that they only work in the GitHub UI, and there's no way to create a Discussion via the GitHub CLI.
(There's more discussion (heh) about adding Discussions into the GitHub CLI here and here, which so far is a "no" from GitHub)
As I'll be starting to work with Discussions a lot more - creating them to propose new features, report bugs, or announce changes - I wanted to have a slightly easier way to interact with the Discussions functionality using my trusty CLI tooling, rather than needing to use the UI.
With this in mind, I've created an extension for the CLI called jamietanna/gh-discussion
which has the ability to create a new Discussion using a given category form in the repository.
Thanks to GitHub Copilot for a little bit of help, I've now got gh discussion create
for all my needs π
Want to give it a spin? Try it out with my testing repository like so:
gh extension install jamietanna/gh-discussion
gh discussion create --repo jamietanna/gh-discussion-testing
And for those who want to see it without locally running it: