Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F71087
D7302.diff
All Users
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
3 KB
Referenced Files
None
Subscribers
None
D7302.diff
View Options
diff --git a/src/applications/releeph/conduit/ConduitAPI_releeph_queryrequests_Method.php b/src/applications/releeph/conduit/ConduitAPI_releeph_queryrequests_Method.php
--- a/src/applications/releeph/conduit/ConduitAPI_releeph_queryrequests_Method.php
+++ b/src/applications/releeph/conduit/ConduitAPI_releeph_queryrequests_Method.php
@@ -46,6 +46,9 @@
foreach ($releephRequests as $releephRequest) {
$branch = $releephRequest->loadReleephBranch();
+ if (!$branch) {
+ continue;
+ }
$request_commit_phid = $releephRequest->getRequestCommitPHID();
$revisionPHID =
$query->getRevisionPHID($request_commit_phid);
diff --git a/src/applications/releeph/query/ReleephRequestQuery.php b/src/applications/releeph/query/ReleephRequestQuery.php
--- a/src/applications/releeph/query/ReleephRequestQuery.php
+++ b/src/applications/releeph/query/ReleephRequestQuery.php
@@ -10,6 +10,7 @@
private $severities;
private $requestorPHIDs;
private $branchIDs;
+ private $revisionPHIDs;
const STATUS_ALL = 'status-all';
const STATUS_OPEN = 'status-open';
@@ -67,22 +68,8 @@
}
public function withRevisionPHIDs(array $revision_phids) {
- $type = PhabricatorEdgeConfig::TYPE_DREV_HAS_COMMIT;
-
- $edges = id(new PhabricatorEdgeQuery())
- ->withSourcePHIDs($revision_phids)
- ->withEdgeTypes(array($type))
- ->execute();
-
- $this->commitToRevMap = array();
-
- foreach ($edges as $revision_phid => $edge) {
- foreach ($edge[$type] as $commitPHID => $item) {
- $this->commitToRevMap[$commitPHID] = $revision_phid;
- }
- }
-
- $this->requestedCommitPHIDs = array_keys($this->commitToRevMap);
+ $this->revisionPHIDs = $revision_phids;
+ return $this;
}
public function loadPage() {
@@ -172,6 +159,31 @@
$this->requestorPHIDs);
}
+ if ($this->revisionPHIDs) {
+ $type = PhabricatorEdgeConfig::TYPE_DREV_HAS_COMMIT;
+
+ $edges = id(new PhabricatorEdgeQuery())
+ ->withSourcePHIDs($this->revisionPHIDs)
+ ->withEdgeTypes(array($type))
+ ->execute();
+
+ $this->commitToRevMap = array();
+ foreach ($edges as $revision_phid => $edge) {
+ foreach ($edge[$type] as $commitPHID => $item) {
+ $this->commitToRevMap[$commitPHID] = $revision_phid;
+ }
+ }
+
+ if (!$this->commitToRevMap) {
+ throw new PhabricatorEmptyQueryException("Malformed Revision Phids");
+ }
+
+ $where[] = qsprintf(
+ $conn_r,
+ 'requestCommitPHID IN (%Ls)',
+ array_keys($this->commitToRevMap));
+ }
+
$where[] = $this->buildPagingClause($conn_r);
return $this->formatWhereClause($where);
diff --git a/src/applications/releeph/storage/ReleephRequest.php b/src/applications/releeph/storage/ReleephRequest.php
--- a/src/applications/releeph/storage/ReleephRequest.php
+++ b/src/applications/releeph/storage/ReleephRequest.php
@@ -55,6 +55,10 @@
*/
public function getPusherIntent() {
$project = $this->loadReleephProject();
+ if (!$project) {
+ return null;
+ }
+
if (!$project->getPushers()) {
return self::INTENT_WANT;
}
@@ -228,7 +232,10 @@
}
public function loadReleephProject() {
- return $this->loadReleephBranch()->loadReleephProject();
+ $branch = $this->loadReleephBranch();
+ if ($branch) {
+ return $branch->loadReleephProject();
+ }
}
public function loadPhabricatorRepositoryCommit() {
File Metadata
Details
Attached
Mime Type
text/x-diff
Storage Engine
amazon-s3
Storage Format
Raw Data
Storage Handle
phabricator/ll/2n/4vi2qwi2f4czm4jv
Default Alt Text
D7302.diff (3 KB)
Attached To
Mode
D7302: [releeph] Conduit failure with bad IDs
Attached
Detach File
Event Timeline
Log In to Comment