def format_data(cls, data):
"""Re-format the response data for the front-end.
Arguments:
data (:py:class:`dict`): The JSON data from the response.
Returns:
:py:class:`dict`: The re-formatted data.
"""
builds = [cls.format_build(build) for build in data.get('builds', [])]
estimate_time(builds)
return dict(
builds=builds[:4],
health=health_summary(builds),
name=data.get('repository_name'),
)
评论列表
文章目录