diff options
author | David Walsh <davidwalsh83@gmail.com> | 2017-07-19 21:06:36 +0200 |
---|---|---|
committer | Dylan William Hardison <dylan@hardison.net> | 2017-07-19 21:06:36 +0200 |
commit | bd5ae5e8e17f448e77766bbb1fdd09ba5e9230ec (patch) | |
tree | 807f23f00d525b51d267287d3317b516a1c8b441 /extensions/Push/lib/Connector/Phabricator.pm | |
parent | fa9970f7a6545fd9ed81a2fef23e5453db46bbec (diff) | |
download | bugzilla-bd5ae5e8e17f448e77766bbb1fdd09ba5e9230ec.tar.gz bugzilla-bd5ae5e8e17f448e77766bbb1fdd09ba5e9230ec.tar.xz |
Bug 1374396 - Add initial push connector for Phabricator
Diffstat (limited to 'extensions/Push/lib/Connector/Phabricator.pm')
-rw-r--r-- | extensions/Push/lib/Connector/Phabricator.pm | 16 |
1 files changed, 2 insertions, 14 deletions
diff --git a/extensions/Push/lib/Connector/Phabricator.pm b/extensions/Push/lib/Connector/Phabricator.pm index 89ca41a2d..5c9cabe8b 100644 --- a/extensions/Push/lib/Connector/Phabricator.pm +++ b/extensions/Push/lib/Connector/Phabricator.pm @@ -37,25 +37,13 @@ sub should_send { return 0 unless Bugzilla->params->{phabricator_enabled}; - if (!( $message->routing_key - =~ /^(?:attachment|bug)\.modify:.*\bbug_group\b/ - ) - ) - { - return 0; - } + return 0 unless $message->routing_key =~ /^(?:attachment|bug)\.modify:.*\bbug_group\b/; my $data = $message->payload_decoded; my $bug_data = $self->_get_bug_data($data) || return 0; my $bug = Bugzilla::Bug->new( { id => $bug_data->{id}, cache => 1 } ); - my $has_phab_stub_attachment - = $bug->has_attachment_with_mimetype(PHAB_CONTENT_TYPE); - - if ($has_phab_stub_attachment) { - return 1; - } - return 0; + return $bug->has_attachment_with_mimetype(PHAB_CONTENT_TYPE); } sub send { |