Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support to remove milestone with gh command #9292

Closed
kerthcet opened this issue Jul 5, 2024 · 5 comments · Fixed by #9344
Closed

Support to remove milestone with gh command #9292

kerthcet opened this issue Jul 5, 2024 · 5 comments · Fixed by #9344
Labels
enhancement a request to improve CLI gh-issue relating to the gh issue command gh-pr relating to the gh pr command help wanted Contributions welcome

Comments

@kerthcet
Copy link

kerthcet commented Jul 5, 2024

Describe the feature or problem you’d like to solve

Right now, we can add milestone with gh issue edit $PR_NUMBER --milestone v0.0.1, however, we can't remove the milestone with gh command, it would be nice to support the remove OP.

Proposed solution

Use Restful API, but not as I expected.

Additional context

@benelan
Copy link

benelan commented Jul 9, 2024

You can set the value to an empty string to remove the milestone:

gh issue edit $PR_NUMBER --milestone ""

@kerthcet
Copy link
Author

Thanks for the help, it works, I have no idea whether this is as designed but a bit confusing to me as we don't have native remove command, but yeah, it works and i'll close this issue. Thanks again.

@williammartin
Copy link
Member

Thanks for the triage @benelan! I'm reopening this because frankly, that's a terrible UX that isn't even documented in the help text 😅

The issue edit and pr edit commands already have a number of add-* and remove-* pairs. I would be happy to have --milestone and --remove-milestone in this case. I'm labelling this help wanted.

Acceptance Criteria

Given I have an issue with a milestone
When I run gh issue edit <id> --remove-milestone
Then gh issue view <id> --json milestone shows the milestone is null

When I run gh issue edit <id> --milestone v0.0.1 --remove-milestone
Then I get an error to "specify only one of --milestone or --remove-milestone

These should also be applicable for Pull Requests.

@williammartin williammartin added help wanted Contributions welcome gh-pr relating to the gh pr command gh-issue relating to the gh issue command and removed needs-triage needs to be reviewed labels Jul 10, 2024
@Khaliq88

This comment was marked as spam.

@Khaliq88

This comment was marked as spam.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement a request to improve CLI gh-issue relating to the gh issue command gh-pr relating to the gh pr command help wanted Contributions welcome
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants