-
Notifications
You must be signed in to change notification settings - Fork 2.2k
/
issue.feature
931 lines (864 loc) · 25.3 KB
/
issue.feature
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
Feature: hub issue
Background:
Given I am in "git://github.com/github/hub.git" git repo
And I am "cornwe19" on github.com with OAuth token "OTOKEN"
Scenario: Fetch issues
Given the GitHub API server:
"""
get('/repos/github/hub/issues') {
assert :assignee => "Cornwe19",
:sort => nil,
:direction => "desc"
json [
{ :number => 999,
:title => "First pull",
:state => "open",
:user => { :login => "octocat" },
:pull_request => { },
},
{ :number => 102,
:title => "First issue",
:state => "open",
:user => { :login => "octocat" },
},
{ :number => 13,
:title => "Second issue",
:state => "open",
:user => { :login => "octocat" },
},
]
}
"""
When I successfully run `hub issue -a Cornwe19`
Then the output should contain exactly:
"""
#102 First issue
#13 Second issue\n
"""
Scenario: List limited number of issues
Given the GitHub API server:
"""
get('/repos/github/hub/issues') {
response.headers["Link"] = %(<https://api.github.com/repositories/12345/issues?per_page=100&page=2>; rel="next")
assert :per_page => "3"
json [
{ :number => 102,
:title => "First issue",
:state => "open",
:user => { :login => "octocat" },
},
{ :number => 13,
:title => "Second issue",
:state => "open",
:user => { :login => "octocat" },
},
{ :number => 999,
:title => "Third issue",
:state => "open",
:user => { :login => "octocat" },
},
]
}
"""
When I successfully run `hub issue -L 2`
Then the output should contain exactly:
"""
#102 First issue
#13 Second issue\n
"""
Scenario: Fetch issues and pull requests
Given the GitHub API server:
"""
get('/repos/github/hub/issues') {
assert :assignee => "Cornwe19",
:sort => nil,
:direction => "desc"
json [
{ :number => 999,
:title => "First pull",
:state => "open",
:user => { :login => "octocat" },
:pull_request => { },
},
{ :number => 102,
:title => "First issue",
:state => "open",
:user => { :login => "octocat" },
},
{ :number => 13,
:title => "Second issue",
:state => "open",
:user => { :login => "octocat" },
},
]
}
"""
When I successfully run `hub issue -a Cornwe19 --include-pulls`
Then the output should contain exactly:
"""
#999 First pull
#102 First issue
#13 Second issue\n
"""
Scenario: Fetch issues not assigned to any milestone
Given the GitHub API server:
"""
get('/repos/github/hub/issues') {
assert :milestone => "none"
json []
}
"""
When I successfully run `hub issue -M none`
Scenario: Fetch issues assigned to milestone by number
Given the GitHub API server:
"""
get('/repos/github/hub/issues') {
assert :milestone => "12"
json []
}
"""
When I successfully run `hub issue -M 12`
Scenario: Fetch issues assigned to milestone by name
Given the GitHub API server:
"""
get('/repos/github/hub/milestones') {
status 200
json [
{ :number => 237, :title => "prerelease" },
{ :number => 1337, :title => "v1" },
{ :number => 41319, :title => "Hello World!" }
]
}
get('/repos/github/hub/issues') {
assert :milestone => "1337"
json []
}
"""
When I successfully run `hub issue -M v1`
Scenario: Fetch issues created by a given user
Given the GitHub API server:
"""
get('/repos/github/hub/issues') {
assert :creator => "octocat"
json []
}
"""
When I successfully run `hub issue -c octocat`
Scenario: Fetch issues mentioning a given user
Given the GitHub API server:
"""
get('/repos/github/hub/issues') {
assert :mentioned => "octocat"
json []
}
"""
When I successfully run `hub issue -@ octocat`
Scenario: Fetch issues with certain labels
Given the GitHub API server:
"""
get('/repos/github/hub/issues') {
assert :labels => "foo,bar"
json []
}
"""
When I successfully run `hub issue -l foo,bar`
Scenario: Fetch issues updated after a certain date and time
Given the GitHub API server:
"""
get('/repos/github/hub/issues') {
assert :since => "2016-08-18T09:11:32Z"
json []
}
"""
When I successfully run `hub issue -d 2016-08-18T09:11:32Z`
Scenario: Fetch issues sorted by number of comments ascending
Given the GitHub API server:
"""
get('/repos/github/hub/issues') {
assert :sort => "comments"
assert :direction => "asc"
json []
}
"""
When I successfully run `hub issue -o comments -^`
Scenario: Fetch issues across multiple pages
Given the GitHub API server:
"""
get('/repos/github/hub/issues') {
assert :per_page => "100", :page => :no
response.headers["Link"] = %(<https://api.github.com/repositories/12345?per_page=100&page=2>; rel="next")
json [
{ :number => 102,
:title => "First issue",
:state => "open",
:user => { :login => "octocat" },
},
]
}
get('/repositories/12345') {
assert :per_page => "100"
if params[:page] == "2"
response.headers["Link"] = %(<https://api.github.com/repositories/12345?per_page=100&page=3>; rel="next")
json [
{ :number => 13,
:title => "Second issue",
:state => "open",
:user => { :login => "octocat" },
},
{ :number => 103,
:title => "Issue from 2nd page",
:state => "open",
:user => { :login => "octocat" },
},
]
elsif params[:page] == "3"
json [
{ :number => 21,
:title => "Even more issuez",
:state => "open",
:user => { :login => "octocat" },
},
]
else
status 400
end
}
"""
When I successfully run `hub issue`
Then the output should contain exactly:
"""
#102 First issue
#13 Second issue
#103 Issue from 2nd page
#21 Even more issuez\n
"""
Scenario: Custom format for issues list
Given the GitHub API server:
"""
get('/repos/github/hub/issues') {
assert :assignee => 'Cornwe19'
json [
{ :number => 102,
:title => "First issue",
:state => "open",
:user => { :login => "lascap" },
},
{ :number => 13,
:title => "Second issue",
:state => "closed",
:user => { :login => "mislav" },
},
]
}
"""
When I successfully run `hub issue -f "%I,%au%n" -a Cornwe19`
Then the output should contain exactly:
"""
102,lascap
13,mislav\n
"""
Scenario: Custom format with no-color labels
Given the GitHub API server:
"""
get('/repos/github/hub/issues') {
json [
{ :number => 102,
:title => "First issue",
:state => "open",
:user => { :login => "morganwahl" },
:labels => [
{ :name => 'Has Migration',
:color => 'cfcfcf' },
{ :name => 'Maintenance Window',
:color => '888888' },
]
},
{ :number => 201,
:title => "No labels",
:state => "open",
:user => { :login => "octocat" },
:labels => []
},
]
}
"""
When I successfully run `hub issue -f "%I: %L%n" --color=never`
Then the output should contain exactly:
"""
102: Has Migration, Maintenance Window
201: \n
"""
Scenario: List all assignees
Given the GitHub API server:
"""
get('/repos/github/hub/issues') {
json [
{ :number => 102,
:title => "First issue",
:state => "open",
:user => { :login => "octocat" },
:assignees => [
{ :login => "mislav" },
{ :login => "lascap" },
]
},
{ :number => 13,
:title => "Second issue",
:state => "closed",
:user => { :login => "octocat" },
:assignees => [
{ :login => "keenahn" },
]
},
]
}
"""
When I successfully run `hub issue -f "%I:%as%n"`
Then the output should contain exactly:
"""
102:mislav, lascap
13:keenahn\n
"""
Scenario: Create an issue
Given the GitHub API server:
"""
post('/repos/github/hub/issues') {
assert :title => "Not workie, pls fix",
:body => "",
:labels => :no
status 201
json :html_url => "https://github.com/github/hub/issues/1337"
}
"""
When I successfully run `hub issue create -m "Not workie, pls fix"`
Then the output should contain exactly:
"""
https://github.com/github/hub/issues/1337\n
"""
Scenario: Create an issue and open in browser
Given the GitHub API server:
"""
post('/repos/github/hub/issues') {
status 201
json :html_url => "the://url"
}
"""
When I successfully run `hub issue create -o -m hello`
Then the output should contain exactly ""
Then "open the://url" should be run
Scenario: Create an issue with labels
Given the GitHub API server:
"""
post('/repos/github/hub/issues') {
assert :title => "hello",
:body => "",
:milestone => :no,
:assignees => :no,
:labels => ["wont fix", "docs", "nope"]
status 201
json :html_url => "https://github.com/github/hub/issues/1337"
}
"""
When I successfully run `hub issue create -m "hello" -l "wont fix,docs" -lnope`
Then the output should contain exactly:
"""
https://github.com/github/hub/issues/1337\n
"""
Scenario: Create an issue with milestone and assignees
Given the GitHub API server:
"""
post('/repos/github/hub/issues') {
assert :title => "hello",
:body => "",
:milestone => 12,
:assignees => ["mislav", "josh", "pcorpet"],
:labels => :no
status 201
json :html_url => "https://github.com/github/hub/issues/1337"
}
"""
When I successfully run `hub issue create -m "hello" -M 12 --assign mislav,josh -apcorpet`
Then the output should contain exactly:
"""
https://github.com/github/hub/issues/1337\n
"""
Scenario: Create an issue with milestone by name
Given the GitHub API server:
"""
get('/repos/github/hub/milestones') {
status 200
json [
{ :number => 237, :title => "prerelease" },
{ :number => 1337, :title => "v1" },
{ :number => 41319, :title => "Hello World!" }
]
}
post('/repos/github/hub/issues') {
assert :milestone => 41319
status 201
json :html_url => "https://github.com/github/hub/issues/1337"
}
"""
When I successfully run `hub issue create -m "hello" -M "hello world!"`
Then the output should contain exactly:
"""
https://github.com/github/hub/issues/1337\n
"""
Scenario: Editing empty issue message
Given the git commit editor is "vim"
And the text editor adds:
"""
hello
my nice issue
"""
Given the GitHub API server:
"""
post('/repos/github/hub/issues') {
assert :title => "hello",
:body => "my nice issue"
status 201
json :html_url => "https://github.com/github/hub/issues/1337"
}
"""
When I successfully run `hub issue create -m '' --edit`
Then the output should contain exactly:
"""
https://github.com/github/hub/issues/1337\n
"""
Scenario: Issue template
Given the git commit editor is "vim"
And the text editor adds:
"""
hello
"""
And a file named "issue_template.md" with:
"""
my nice issue template
"""
Given the GitHub API server:
"""
post('/repos/github/hub/issues') {
assert :title => "hello",
:body => "my nice issue template"
status 201
json :html_url => "https://github.com/github/hub/issues/1337"
}
"""
When I successfully run `hub issue create`
Then the output should contain exactly:
"""
https://github.com/github/hub/issues/1337\n
"""
Scenario: Issue template from a subdirectory
Given the git commit editor is "vim"
And the text editor adds:
"""
hello
"""
And a file named ".github/issue_template.md" with:
"""
my nice issue template
"""
Given the GitHub API server:
"""
post('/repos/github/hub/issues') {
assert :title => "hello",
:body => "my nice issue template"
status 201
json :html_url => "https://github.com/github/hub/issues/1337"
}
"""
Given a directory named "subdir"
When I cd to "subdir"
And I successfully run `hub issue create`
Then the output should contain exactly:
"""
https://github.com/github/hub/issues/1337\n
"""
Scenario: Multiple issue templates
Given the git commit editor is "vim"
And the text editor adds:
"""
hello
"""
And a file named ".github/ISSUE_TEMPLATE/bug_report.md" with:
"""
I want to report a bug
"""
And a file named ".github/ISSUE_TEMPLATE/feature_request.md" with:
"""
There is a feature that I need!
"""
Given the GitHub API server:
"""
post('/repos/github/hub/issues') {
assert :title => "hello",
:body => ""
status 201
json :html_url => "https://github.com/github/hub/issues/1337"
}
"""
When I successfully run `hub issue create`
Then the output should contain exactly:
"""
https://github.com/github/hub/issues/1337\n
"""
Scenario: Multiple issue templates with default
Given the git commit editor is "vim"
And the text editor adds:
"""
hello
"""
And a directory named ".github/ISSUE_TEMPLATE"
And a file named ".github/ISSUE_TEMPLATE.md" with:
"""
The default template
"""
Given the GitHub API server:
"""
post('/repos/github/hub/issues') {
assert :title => "hello",
:body => "The default template"
status 201
json :html_url => "https://github.com/github/hub/issues/1337"
}
"""
When I successfully run `hub issue create`
Then the output should contain exactly:
"""
https://github.com/github/hub/issues/1337\n
"""
Scenario: A file named ".github"
Given the git commit editor is "vim"
And the text editor adds:
"""
hello
"""
And a file named ".github" with:
"""
this is ignored
"""
Given the GitHub API server:
"""
post('/repos/github/hub/issues') {
assert :title => "hello",
:body => ""
status 201
json :html_url => "https://github.com/github/hub/issues/1337"
}
"""
When I successfully run `hub issue create`
Then the output should contain exactly:
"""
https://github.com/github/hub/issues/1337\n
"""
Scenario: Update an issue's title
Given the GitHub API server:
"""
patch('/repos/github/hub/issues/1337') {
assert :title => "Not workie, pls fix",
:body => "",
:milestone => :no,
:assignees => :no,
:labels => :no,
:state => :no
}
"""
Then I successfully run `hub issue update 1337 -m "Not workie, pls fix"`
Scenario: Update an issue's state
Given the GitHub API server:
"""
patch('/repos/github/hub/issues/1337') {
assert :title => :no,
:labels => :no,
:state => "closed"
}
"""
Then I successfully run `hub issue update 1337 -s closed`
Scenario: Update an issue's labels
Given the GitHub API server:
"""
patch('/repos/github/hub/issues/1337') {
assert :title => :no,
:body => :no,
:milestone => :no,
:assignees => :no,
:labels => ["bug", "important"]
}
"""
Then I successfully run `hub issue update 1337 -l bug,important`
Scenario: Update an issue's milestone
Given the GitHub API server:
"""
patch('/repos/github/hub/issues/1337') {
assert :title => :no,
:body => :no,
:milestone => 42,
:assignees => :no,
:labels => :no
}
"""
Then I successfully run `hub issue update 1337 -M 42`
Scenario: Update an issue's milestone by name
Given the GitHub API server:
"""
get('/repos/github/hub/milestones') {
status 200
json [
{ :number => 237, :title => "prerelease" },
{ :number => 42, :title => "Hello World!" }
]
}
patch('/repos/github/hub/issues/1337') {
assert :title => :no,
:body => :no,
:milestone => 42,
:assignees => :no,
:labels => :no
}
"""
Then I successfully run `hub issue update 1337 -M "hello world!"`
Scenario: Update an issue's assignees
Given the GitHub API server:
"""
patch('/repos/github/hub/issues/1337') {
assert :title => :no,
:body => :no,
:milestone => :no,
:assignees => ["Cornwe19"],
:labels => :no
}
"""
Then I successfully run `hub issue update 1337 -a Cornwe19`
Scenario: Update an issue's title, labels, milestone, and assignees
Given the GitHub API server:
"""
patch('/repos/github/hub/issues/1337') {
assert :title => "Not workie, pls fix",
:body => "",
:milestone => 42,
:assignees => ["Cornwe19"],
:labels => ["bug", "important"]
}
"""
Then I successfully run `hub issue update 1337 -m "Not workie, pls fix" -M 42 -l bug,important -a Cornwe19`
Scenario: Clear existing issue labels, assignees, milestone
Given the GitHub API server:
"""
patch('/repos/github/hub/issues/1337') {
assert :title => :no,
:body => :no,
:milestone => nil,
:assignees => [],
:labels => []
}
"""
Then I successfully run `hub issue update 1337 --milestone= --assign= --labels=`
Scenario: Update an issue's title and body manually
Given the git commit editor is "vim"
And the text editor adds:
"""
My new title
"""
Given the GitHub API server:
"""
get('/repos/github/hub/issues/1337') {
json \
:number => 1337,
:title => "My old title",
:body => "My old body"
}
patch('/repos/github/hub/issues/1337') {
assert :title => "My new title",
:body => "My old title\n\nMy old body",
:milestone => :no,
:assignees => :no,
:labels => :no
}
"""
Then I successfully run `hub issue update 1337 --edit`
Scenario: Update an issue's title and body via a file
Given a file named "my-issue.md" with:
"""
My new title
My new body
"""
Given the GitHub API server:
"""
patch('/repos/github/hub/issues/1337') {
assert :title => "My new title",
:body => "My new body",
:milestone => :no,
:assignees => :no,
:labels => :no
}
"""
Then I successfully run `hub issue update 1337 -F my-issue.md`
Scenario: Update an issue without specifying fields to update
When I run `hub issue update 1337`
Then the exit status should be 1
Then the stderr should contain "please specify fields to update"
Then the stderr should contain "Usage: hub issue"
Scenario: Fetch issue labels
Given the GitHub API server:
"""
get('/repos/github/hub/labels') {
response.headers["Link"] = %(<https://api.github.com/repositories/12345/labels?per_page=100&page=2>; rel="next")
assert :per_page => "100", :page => nil
json [
{ :name => "Discuss",
:color => "0000ff",
},
{ :name => "bug",
:color => "ff0000",
},
{ :name => "feature",
:color => "00ff00",
},
]
}
get('/repositories/12345/labels') {
assert :per_page => "100", :page => "2"
json [
{ :name => "affects",
:color => "ffffff",
},
]
}
"""
When I successfully run `hub issue labels`
Then the output should contain exactly:
"""
affects
bug
Discuss
feature\n
"""
Scenario: Fetch single issue
Given the GitHub API server:
"""
get('/repos/github/hub/issues/102') {
json \
:number => 102,
:state => "open",
:body => "I want this feature",
:title => "Feature request for hub issue show",
:created_at => "2017-04-14T16:00:49Z",
:user => { :login => "royels" },
:assignees => [{:login => "royels"}],
:comments => 1
}
get('/repos/github/hub/issues/102/comments') {
json [
{ :body => "I am from the future",
:created_at => "2011-04-14T16:00:49Z",
:user => { :login => "octocat" }
},
{ :body => "I did the thing",
:created_at => "2013-10-30T22:20:00Z",
:user => { :login => "hubot" }
},
]
}
"""
When I successfully run `hub issue show 102`
Then the output should contain exactly:
"""
# Feature request for hub issue show
* created by @royels on 2017-04-14 16:00:49 +0000 UTC
* assignees: royels
I want this feature
## Comments:
### comment by @octocat on 2011-04-14 16:00:49 +0000 UTC
I am from the future
### comment by @hubot on 2013-10-30 22:20:00 +0000 UTC
I did the thing\n
"""
Scenario: Format single issue
Given the GitHub API server:
"""
get('/repos/github/hub/issues/102') {
json \
:number => 102,
:state => "open",
:body => "I want this feature",
:title => "Feature request for hub issue show",
:created_at => "2017-04-14T16:00:49Z",
:user => { :login => "royels" },
:assignees => [{:login => "royels"}],
:comments => 1
}
get('/repos/github/hub/issues/102/comments') {
json [
{ :body => "I am from the future",
:created_at => "2011-04-14T16:00:49Z",
:user => { :login => "octocat" }
},
{ :body => "I did the thing",
:created_at => "2013-10-30T22:20:00Z",
:user => { :login => "hubot" }
},
]
}
"""
When I successfully run `hub issue show 102 --format='%I %t%n%n%b%n'`
Then the output should contain exactly:
"""
102 Feature request for hub issue show
I want this feature\n
"""
Scenario: Format with literal % characters
Given the GitHub API server:
"""
get('/repos/github/hub/issues/102') {
json \
:number => 102,
:state => "open",
:title => "Feature request % hub",
:user => { :login => "alexfornuto" }
}
get('/repos/github/hub/issues/102/comments') {
json []
}
"""
When I successfully run `hub issue show 102 --format='%t%%t%%n%n'`
Then the output should contain exactly:
"""
Feature request % hub%t%n\n
"""
Scenario: Did not supply an issue number
When I run `hub issue show`
Then the exit status should be 1
Then the stderr should contain "Usage: hub issue"
Scenario: Show error message if http code is not 200 for issues endpoint
Given the GitHub API server:
"""
get('/repos/github/hub/issues/102') {
status 500
}
"""
When I run `hub issue show 102`
Then the output should contain exactly:
"""
Error fetching issue: Internal Server Error (HTTP 500)\n
"""
Scenario: Show error message if http code is not 200 for comments endpoint
Given the GitHub API server:
"""
get('/repos/github/hub/issues/102') {
json \
:number => 102,
:body => "I want this feature",
:title => "Feature request for hub issue show",
:created_at => "2017-04-14T16:00:49Z",
:user => { :login => "royels" }
}
get('/repos/github/hub/issues/102/comments') {
status 404
}
"""
When I run `hub issue show 102`
Then the output should contain exactly:
"""
Error fetching comments for issue: Not Found (HTTP 404)\n
"""