def run(self, event):
        """Process an event.

        .. note::

            We should only do basic server side operation here, since we send
            the rest of the processing to a Celery task which will be mainly
            accessing the GitHub API.
        """
        repo_id = event.payload['repository']['id']

        # Ping event - update the ping timestamp of the repository
        if 'hook_id' in event.payload and 'zen' in event.payload:
            repository = Repository.query.filter_by(
                github_id=repo_id
            ).one()
            repository.ping = datetime.utcnow()
            db.session.commit()
            return

        # Release event
        if 'release' in event.payload and \
                event.payload.get('action') == 'published':
            try:
                release = Release.create(event)
                db.session.commit()

                # FIXME: If we want to skip the processing, we should do it
                # here (eg. We're in the middle of a migration).
                # if current_app.config['GITHUB_PROCESS_RELEASES']:
                process_release.delay(
                    release.release_id,
                    verify_sender=self.verify_sender
                )
            except (ReleaseAlreadyReceivedError, RepositoryDisabledError) as e:
                event.response_code = 409
                event.response = dict(message=str(e), status=409)
            except RepositoryAccessError as e:
                event.response = 403
                event.response = dict(message=str(e), status=403)
Process an event.

        .. note::

            We should only do basic server side operation here, since we send
            the rest of the processing to a Celery task which will be mainly
            accessing the GitHub API.