Fix --milestone flag on issues list command#1462
Conversation
This fix involves using the REST API since the GraphQL one doesn't seem to return the necessary ID for the subsequent issues query.
|
The use of the REST API appears to be unavoidable since the GraphQL API does not provide the necessary ID for the use in the query. Hopefully this could change in the future to avoid this workaround. |
mislav
left a comment
There was a problem hiding this comment.
Excellent; thanks for tackling this!
Since we can obtain the necessary ID for the query on node ID from the GraphQL API, it makes sense to remove the REST version.
|
@mislav |
|
Thanks for the PR! I played around with this and here are some findings:
|
mislav
left a comment
There was a problem hiding this comment.
Almost there! One small but important change needed before we would merge this.
|
@tierninho @mislav I've added the check for a not found milestone, alongside with a test, and it should solve the first issue pointed out by @tierninho. For the second one, it looks like the pattern of using |
|
Thanks for adding below @fsmiamoto
One nitpick though: please wrap it with two empty lines like the pic, as it will match current messaging. Appreciate it! |
mislav
left a comment
There was a problem hiding this comment.
Fantastic. Thank you so much!
|
Thanks for testing it out @tierninho 👍 As for the formatting, since we raise an error for not finding the milestone, I've tried to keep to stick to the existing pattern. I definitely agree that it looks better on the second command but since it doesn't actually raise an error, the output is handled differently. |
|
That looks great! Nice work @fsmiamoto - love that http://github.com/safecast got an implicit mention in all this 😆 |

This PR adds a fix to the
--milestoneflag on theissues listcommand as described in #1441I'm not sure if the approach I took was the best one so any feedback would be great 👍
Edit:
Closes #1441