File tree Expand file tree Collapse file tree 2 files changed +4
-1
lines changed Expand file tree Collapse file tree 2 files changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -241,7 +241,7 @@ class IssuesService extends Service {
241
241
/// API docs: https://developer.github.com/v3/issues/labels/#get-a-single-label
242
242
Future <IssueLabel > getLabel (RepositorySlug slug, String name) {
243
243
return _github.getJSON ("/repos/${slug .fullName }/labels/${name }" ,
244
- convert: IssueLabel .fromJSON);
244
+ convert: IssueLabel .fromJSON, statusCode : StatusCodes . OK );
245
245
}
246
246
247
247
/// Creates a new label on the specified repository.
Original file line number Diff line number Diff line change @@ -181,6 +181,9 @@ class IssueLabel {
181
181
static IssueLabel fromJSON (input) {
182
182
if (input == null ) return null ;
183
183
184
+ assert (input['name' ] != null );
185
+ assert (input['color' ] != null );
186
+
184
187
return new IssueLabel ()
185
188
..name = input['name' ]
186
189
..color = input['color' ];
You can’t perform that action at this time.
0 commit comments