def update_status(self, status):
        # let it raise
        token = self.repository.get_token()  # pylint: disable=no-member
        if status not in ('success', 'pending', 'errored', 'failure'):
            raise InvalidStatus('Invalid status.')
        self.status = status
        self.save()
        github.create_status(
            token.value, self.repository.name, self.sha,
            state=status, target_url=self.url
        )
Update the Build status, both in database
dataset/ETHPy150Open m-vdb/github-buildservice-boilerplate/buildservice/models/build.py/Build.update_status