diff --git a/pagure/hooks/pagure_ci.py b/pagure/hooks/pagure_ci.py index fbcc74a..9b65359 100644 --- a/pagure/hooks/pagure_ci.py +++ b/pagure/hooks/pagure_ci.py @@ -22,7 +22,7 @@ from sqlalchemy.orm import relation from sqlalchemy.orm import backref import pagure.lib -from pagure.hooks import BaseHook, RequiredIf +from pagure.hooks import BaseHook, BaseRunner, RequiredIf from pagure.lib.model import BASE, Project @@ -62,6 +62,15 @@ class PagureCITable(BASE): ) + +class PagureCIRunner(BaseRunner): + """ Runner for the pagure-ci hook, it does nothing as the magic is part + of the CI system itself (to see if there was a commit made and build if + so). + """ + pass + + tmpl = """ {% if repo | hasattr('ci_hook') and repo.ci_hook and repo.ci_hook.pagure_ci_token %} @@ -154,6 +163,7 @@ class PagureCi(BaseHook): db_object = PagureCITable backref = "ci_hook" form_fields = ["ci_type", "ci_url", "ci_job", "active_commit", "active_pr"] + runner = PagureCIRunner @classmethod def set_up(cls, project):