diff options
author | dklawren <dklawren@users.noreply.github.com> | 2018-08-03 17:54:28 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-08-03 17:54:28 +0200 |
commit | b5cd44920312cf3f8b3fb582ead9a7bda85142ee (patch) | |
tree | d1e1d0feee223301e7786431b83870efe7cf0e29 /extensions/PhabBugz | |
parent | 78f92784326f23d1cb50d116d9b919f80a4e766a (diff) | |
download | bugzilla-b5cd44920312cf3f8b3fb582ead9a7bda85142ee.tar.gz bugzilla-b5cd44920312cf3f8b3fb582ead9a7bda85142ee.tar.xz |
Bug 1479350 - "Phabricator Reviews Requested of You" lists bugs which I have reviewed
Diffstat (limited to 'extensions/PhabBugz')
-rw-r--r-- | extensions/PhabBugz/lib/Util.pm | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/extensions/PhabBugz/lib/Util.pm b/extensions/PhabBugz/lib/Util.pm index 99668289a..5dbe31d0e 100644 --- a/extensions/PhabBugz/lib/Util.pm +++ b/extensions/PhabBugz/lib/Util.pm @@ -267,15 +267,27 @@ sub get_needs_review { }, constraints => { reviewerPHIDs => [$phab_user->phid], - statuses => [qw( needs-review )], + statuses => ["open()"], }, - order => 'newest', + order => 'newest', } ); ThrowCodeError('phabricator_api_error', { reason => 'Malformed Response' }) unless exists $diffs->{result}{data}; - return $diffs->{result}{data}; + my @revisions; + foreach my $revision ( @{ $diffs->{result}{data} } ) { + foreach my $reviewer ( @{ $revision->{attachments}->{reviewers}->{reviewers} } ) { + if ( $reviewer->{reviewerPHID} eq $phab_user->phid + && $reviewer->{status} =~ /^(?:added|blocking)$/ ) + { + push @revisions, $revision; + last; + } + } + } + + return \@revisions; } 1; |