'Replace all labels on this issue with ``labels``.
:param list labels: label names
:returns: list of :class:`Label`'

@requires_auth
def replace_labels(self, labels):

    url = self._build_url(u'labels', base_url=self._api)
    json = self._json(self._put(url, data=dumps(labels)), 200)
    return ([Label(l, self) for l in json] if json else [])
