summaryrefslogtreecommitdiffstats
path: root/extensions/Push
diff options
context:
space:
mode:
authorDavid Walsh <davidwalsh83@gmail.com>2017-09-07 15:40:04 +0200
committerDylan William Hardison <dylan@hardison.net>2017-09-07 15:40:04 +0200
commit8feb55f32ccd688d2b51105f4d56985abf0baa93 (patch)
tree4cb46feadc0c1f53120c7c1f80fc97965720d355 /extensions/Push
parente78484acbcf9d8df3a2efd00babe9c78d282ec1f (diff)
downloadbugzilla-8feb55f32ccd688d2b51105f4d56985abf0baa93.tar.gz
bugzilla-8feb55f32ccd688d2b51105f4d56985abf0baa93.tar.xz
Bug 1396042 - Implement logging for the BMO push connector
Diffstat (limited to 'extensions/Push')
-rw-r--r--extensions/Push/lib/Connector/Phabricator.pm20
1 files changed, 18 insertions, 2 deletions
diff --git a/extensions/Push/lib/Connector/Phabricator.pm b/extensions/Push/lib/Connector/Phabricator.pm
index c92df3173..8a307ea72 100644
--- a/extensions/Push/lib/Connector/Phabricator.pm
+++ b/extensions/Push/lib/Connector/Phabricator.pm
@@ -21,8 +21,8 @@ use Bugzilla::User;
use Bugzilla::Extension::PhabBugz::Constants;
use Bugzilla::Extension::PhabBugz::Util qw(
add_comment_to_revision create_private_revision_policy
- edit_revision_policy get_attachment_revisions get_bug_role_phids
- get_revisions_by_ids intersect is_attachment_phab_revision
+ edit_revision_policy get_attachment_revisions get_bug_role_phids
+ get_revisions_by_ids intersect is_attachment_phab_revision
make_revision_public make_revision_private);
use Bugzilla::Extension::Push::Constants;
use Bugzilla::Extension::Push::Util qw(is_public);
@@ -79,6 +79,12 @@ sub send {
my @revisions = get_attachment_revisions($bug);
foreach my $revision (@revisions) {
+ Bugzilla->audit(sprintf(
+ 'Making revision %s for bug %s private due to unkown Bugzilla groups: %s',
+ $revision->{id},
+ $bug->id,
+ join(', ', @set_groups)
+ ));
add_comment_to_revision( $revision->{phid}, $phab_error_message );
make_revision_private( $revision->{phid} );
}
@@ -115,9 +121,19 @@ sub send {
my $revision_phid = $revision->{phid};
if ($is_public) {
+ Bugzilla->audit(sprintf(
+ 'Making revision %s public for bug %s',
+ $revision->{id},
+ $bug->id
+ ));
make_revision_public($revision_phid);
}
else {
+ Bugzilla->audit(sprintf(
+ 'Giving revision %s a custom policy for bug %s',
+ $revision->{id},
+ $bug->id
+ ));
edit_revision_policy( $revision_phid, $policy_phid, $subscribers );
}
}