Created
August 2, 2017 16:34
-
-
Save dklawren/f67f3f3bf95fba6365fff401144f8224 to your computer and use it in GitHub Desktop.
extensions/Push/lib/Connector/Phabricator.pm
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/extensions/Push/lib/Connector/Phabricator.pm b/extensions/Push/lib/Connector/Phabricator.pm | |
index 092d63dd3..2d2fd2cb5 100644 | |
--- a/extensions/Push/lib/Connector/Phabricator.pm | |
+++ b/extensions/Push/lib/Connector/Phabricator.pm | |
@@ -90,9 +90,10 @@ sub send { | |
: 'One revision was' ) | |
. ' made private due to unknown Bugzilla groups.'; | |
- my $user = | |
- Bugzilla->set_user( | |
- Bugzilla::User->new( { name => 'conduit@mozilla.bugs' } ) ); | |
+ my $user = Bugzilla::User->new( { name => 'phab-bot@bmo.tld' } ); | |
+ $user->{groups} = [ Bugzilla::Group->get_all ]; | |
+ $user->{bless_groups} = [ Bugzilla::Group->get_all ]; | |
+ Bugzilla->set_user($user); | |
$bug->add_comment( $bmo_error_message, { isprivate => 0 } ); | |
my $bug_changes = $bug->update(); | |
$bug->send_changes($bug_changes); | |
@@ -130,7 +131,7 @@ sub _get_attachment_revisions() { | |
my @attachments = grep { | |
$_->isobsolete == 0 | |
&& $_->contenttype eq PHAB_CONTENT_TYPE | |
- && $_->attacher->login ne 'phab-bot@bmo.tld' | |
+ && $_->attacher->login eq 'phab-bot@bmo.tld' | |
} @{ $bug->attachments() }; | |
if (@attachments) { |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment