'Create a status object on a commit.
:param str sha: (required), SHA of the commit to create the status on
:param str state: (required), state of the test; only the following
are accepted: \'pending\', \'success\', \'error\', \'failure\'
:param str target_url: (optional), URL to associate with this status.
:param str description: (optional), short description of the status
:param str context: (optional), A string label to differentiate this
status from the status of other systems
:returns: the status created if successful
:rtype: :class:`~github3.repos.status.Status`'

@requires_auth
def create_status(self, sha, state, target_url=None, description=None, context=u'default'):

    json = None
    if (sha and state):
        data = {u'state': state, u'target_url': target_url, u'description': description, u'context': context}
        url = self._build_url(u'statuses', sha, base_url=self._api)
        self._remove_none(data)
        json = self._json(self._post(url, data=data), 201)
    return self._instance_or_null(Status, json)
