diff --git a/pagure/lib/__init__.py b/pagure/lib/__init__.py index 3b48fa7..93fc569 100644 --- a/pagure/lib/__init__.py +++ b/pagure/lib/__init__.py @@ -1139,6 +1139,14 @@ def add_pull_request_comment(session, request, commit, tree_id, filename, redis=REDIS, ) + if comment.strip().lower() == "pretty please pagure-ci rebuild": + # Send notification to the CI server + if REDIS and request.project.ci_hook and PAGURE_CI: + REDIS.publish('pagure.ci', json.dumps({ + 'ci_type': request.project.ci_hook.ci_type, + 'pr': request.to_json(public=True, with_comments=False) + })) + return 'Comment added'