@@ -170,13 +170,18 @@ func TestIssueList_tty_withFlags(t *testing.T) {
170170 assert .Equal (t , "probablyCher" , params ["assignee" ].(string ))
171171 assert .Equal (t , "foo" , params ["author" ].(string ))
172172 assert .Equal (t , "me" , params ["mention" ].(string ))
173+ assert .Equal (t , "12345" , params ["milestone" ].(string )) // Database ID for the Milestone (see #1441)
173174 assert .Equal (t , []interface {}{"web" , "bug" }, params ["labels" ].([]interface {}))
174175 assert .Equal (t , []interface {}{"OPEN" }, params ["states" ].([]interface {}))
175176 }))
176177 http .Register (
177- httpmock .REST ("GET" , "repos/OWNER/REPO/milestones" ),
178- httpmock .StringResponse ("[]" ),
179- )
178+ httpmock .GraphQL (`query RepositoryMilestoneList\b` ),
179+ httpmock .StringResponse (`
180+ { "data": { "repository": { "milestones": {
181+ "nodes": [{ "title":"1.x", "id": "MDk6TWlsZXN0b25lMTIzNDU=" }],
182+ "pageInfo": { "hasNextPage": false }
183+ } } } }
184+ ` ))
180185
181186 output , err := RunCommand ("issue list -a probablyCher -l web,bug -s open -A foo --mention me --milestone 1.x" )
182187 if err != nil {
0 commit comments