Hub: Support creation of milestones

Created on 21 Nov 2016  Â·  4Comments  Â·  Source: github/hub

Please consider a milestone subcommand for hub that would allow users to create and modify milestones. Looking at #1232, and searching through open issues, I haven't seen anything to this effect on the roadmap. Note that I've requested this same feature be implemented in ghi at https://github.com/stephencelis/ghi/issues/321.

feature

Most helpful comment

Thanks for explaining your use-case!

For the longest time now, I've had this plan of creating a low-level hub api command that will let you make manual API requests for all functionality that is currently not covered with the rest of hub's built-in feature set. The api command would take care of authentication and JSON serialization for you, making it very easy to POST something to the /milestones endpoint of the current project. See https://github.com/github/hub/issues/1203 for example of another use-case.

However, considering that we're moving towards GraphQL at GitHub for the next generation of our API, I'm reluctant to ship the api command that would rely on the API v3 (our current, REST API). I would much rather explore how this could be possible using GraphQL.

In any case, there will always be people like you who want to do a thing with hub that is currently not implemented via any command, and it would be nice if we had a low-level scripting interface that would allow a more flexible access. If such a command existed right now, you could start using it right away in your scripts instead of waiting for a future release of hub that would implement some sort of milestone create command.

All 4 comments

Thanks for the suggestion. Let's see how many users are interested in this feature— hopefully they will add their 👍 to your idea over time.

This isn't on my own personal roadmap for hub, since there are many tasks that have much higher priority for the next release, and I believe that project management features of GitHub (milestones, projects, editing labels) are best performed in the web interface rather than CLI.

Thanks for the quick response. My issue is that I manage a large number of fine-grained repositories that all share milestones and labels, so I have a real need to automate this stuff. I script things with ghi and hub where I can, and drop down to to the GitHub API where necessary. Milestone creation is the only thing that I have to resort to the API for now, and that's why I ask.

Thanks for explaining your use-case!

For the longest time now, I've had this plan of creating a low-level hub api command that will let you make manual API requests for all functionality that is currently not covered with the rest of hub's built-in feature set. The api command would take care of authentication and JSON serialization for you, making it very easy to POST something to the /milestones endpoint of the current project. See https://github.com/github/hub/issues/1203 for example of another use-case.

However, considering that we're moving towards GraphQL at GitHub for the next generation of our API, I'm reluctant to ship the api command that would rely on the API v3 (our current, REST API). I would much rather explore how this could be possible using GraphQL.

In any case, there will always be people like you who want to do a thing with hub that is currently not implemented via any command, and it would be nice if we had a low-level scripting interface that would allow a more flexible access. If such a command existed right now, you could start using it right away in your scripts instead of waiting for a future release of hub that would implement some sort of milestone create command.

After some consideration, I have decided that—for now—this is best implemented in user scripts, rather than maintained in hub core. Now that there is a new hub api command, I will close this feature request and leave implementing this as an exercise to the reader. https://github.com/github/hub/releases/tag/v2.8.3 https://github.com/github/hub/pull/2016

Thank you for suggesting!

Was this page helpful?
0 / 5 - 0 ratings