File tree Expand file tree Collapse file tree 1 file changed +17
-2
lines changed Expand file tree Collapse file tree 1 file changed +17
-2
lines changed Original file line number Diff line number Diff line change @@ -245,6 +245,22 @@ def check_runs(self):
245
245
)
246
246
247
247
248
+ class CheckRunOutput (models .GitHubCore ):
249
+
250
+ class_name = "CheckRunOutput"
251
+ CUSTOM_HEADERS = {"Accept" : "application/vnd.github.antiope-preview+json" }
252
+
253
+ def _update_attributes (self , output ):
254
+ self .title = output ["title" ]
255
+ self .summary = output ["summary" ]
256
+ self .text = output ["text" ]
257
+ self .annotations_count = output ["annotations_count" ]
258
+ self .annotations_url = output ["annotations_url" ]
259
+
260
+ def _repr (self ):
261
+ return "<{s.class_name} [{s.title}]>" .format (s = self )
262
+
263
+
248
264
class CheckRun (models .GitHubCore ):
249
265
"""The :class:`CheckRun <CheckRun>` object.
250
266
@@ -339,8 +355,7 @@ def _update_attributes(self, run):
339
355
self .external_id = run ["external_id" ]
340
356
self .app = CheckApp (run ["app" ], self )
341
357
self .check_suite = run ["check_suite" ]["id" ]
342
- # self.output = CheckRunOutput(run['output'], self)
343
- self .output = run ["output" ] # TODO: turn into an object
358
+ self .output = CheckRunOutput (run ["output" ], self )
344
359
345
360
def _repr (self ):
346
361
return "<{s.class_name} [{s.name}:{s.status}]>" .format (s = self )
You can’t perform that action at this time.
0 commit comments