Page MenuHomePhabricator

D7807.id17664.diff
No OneTemporary

D7807.id17664.diff

Index: src/applications/diffusion/herald/HeraldPreCommitContentAdapter.php
===================================================================
--- src/applications/diffusion/herald/HeraldPreCommitContentAdapter.php
+++ src/applications/diffusion/herald/HeraldPreCommitContentAdapter.php
@@ -50,6 +50,7 @@
self::FIELD_PUSHER,
self::FIELD_PUSHER_PROJECTS,
self::FIELD_DIFFERENTIAL_REVISION,
+ self::FIELD_DIFFERENTIAL_ACCEPTED,
self::FIELD_DIFFERENTIAL_REVIEWERS,
self::FIELD_DIFFERENTIAL_CCS,
self::FIELD_RULE,
@@ -118,6 +119,16 @@
return null;
}
return $revision->getPHID();
+ case self::FIELD_DIFFERENTIAL_ACCEPTED:
+ $revision = $this->getRevision();
+ if (!$revision) {
+ return null;
+ }
+ $status_accepted = ArcanistDifferentialRevisionStatus::ACCEPTED;
+ if ($revision->getStatus() != $status_accepted) {
+ return null;
+ }
+ return $revision->getPHID();
case self::FIELD_DIFFERENTIAL_REVIEWERS:
$revision = $this->getRevision();
if (!$revision) {
Index: src/applications/herald/adapter/HeraldAdapter.php
===================================================================
--- src/applications/herald/adapter/HeraldAdapter.php
+++ src/applications/herald/adapter/HeraldAdapter.php
@@ -30,6 +30,7 @@
const FIELD_DIFFERENTIAL_REVISION = 'differential-revision';
const FIELD_DIFFERENTIAL_REVIEWERS = 'differential-reviewers';
const FIELD_DIFFERENTIAL_CCS = 'differential-ccs';
+ const FIELD_DIFFERENTIAL_ACCEPTED = 'differential-accepted';
const CONDITION_CONTAINS = 'contains';
const CONDITION_NOT_CONTAINS = '!contains';
@@ -169,6 +170,8 @@
self::FIELD_DIFFERENTIAL_REVISION => pht('Differential revision'),
self::FIELD_DIFFERENTIAL_REVIEWERS => pht('Differential reviewers'),
self::FIELD_DIFFERENTIAL_CCS => pht('Differential CCs'),
+ self::FIELD_DIFFERENTIAL_ACCEPTED
+ => pht('Accepted Differential revision'),
);
}
@@ -284,6 +287,7 @@
self::CONDITION_INCLUDE_NONE,
);
case self::FIELD_DIFFERENTIAL_REVISION:
+ case self::FIELD_DIFFERENTIAL_ACCEPTED:
return array(
self::CONDITION_EXISTS,
self::CONDITION_NOT_EXISTS,
Index: src/applications/herald/adapter/HeraldCommitAdapter.php
===================================================================
--- src/applications/herald/adapter/HeraldCommitAdapter.php
+++ src/applications/herald/adapter/HeraldCommitAdapter.php
@@ -336,6 +336,16 @@
return null;
}
return $revision->getID();
+ case self::FIELD_DIFFERENTIAL_ACCEPTED:
+ $revision = $this->loadDifferentialRevision();
+ if (!$revision) {
+ return null;
+ }
+ $status_accepted = ArcanistDifferentialRevisionStatus::ACCEPTED;
+ if ($revision->getStatus() != $status_accepted) {
+ return null;
+ }
+ return $revision->getPHID();
case self::FIELD_DIFFERENTIAL_REVIEWERS:
$revision = $this->loadDifferentialRevision();
if (!$revision) {

File Metadata

Mime Type
text/plain
Expires
Sun, Nov 10, 6:09 PM (1 w, 2 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6726399
Default Alt Text
D7807.id17664.diff (3 KB)

Event Timeline