summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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 );
}
}