| |
@@ -1134,7 +1134,7 @@
|
| |
# Send notification to the CI server, if the comment added was a
|
| |
# notification and the PR is still open and project is not private
|
| |
if notification and request.status == 'Open' \
|
| |
- and request.project.ci_hook and PAGURE_CI \
|
| |
+ and PAGURE_CI and request.project.ci_hook\
|
| |
and not request.project.private:
|
| |
REDIS.publish('pagure.ci', json.dumps({
|
| |
'ci_type': request.project.ci_hook.ci_type,
|
| |
@@ -1153,7 +1153,7 @@
|
| |
|
| |
if trigger_ci and comment.strip().lower() in trigger_ci:
|
| |
# Send notification to the CI server
|
| |
- if REDIS and request.project.ci_hook and PAGURE_CI:
|
| |
+ if REDIS and PAGURE_CI and request.project.ci_hook:
|
| |
REDIS.publish('pagure.ci', json.dumps({
|
| |
'ci_type': request.project.ci_hook.ci_type,
|
| |
'pr': request.to_json(public=True, with_comments=False)
|
| |
@@ -1518,7 +1518,7 @@
|
| |
)
|
| |
|
| |
# Send notification to the CI server
|
| |
- if REDIS and request.project.ci_hook and PAGURE_CI \
|
| |
+ if REDIS and PAGURE_CI and request.project.ci_hook \
|
| |
and not request.project.private:
|
| |
REDIS.publish('pagure.ci', json.dumps({
|
| |
'ci_type': request.project.ci_hook.ci_type,
|
| |
This is a simple change to short-circuit the if statement if pagure-ci is not configured. I can't run the unit tests right now but when I test this in a deployment, it solves the 500 problem when a PR is created in a pagure instance without pagure-ci configured