Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F85620
D7668.diff
All Users
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
D7668.diff
View Options
diff --git a/src/applications/diffusion/conduit/ConduitAPI_diffusion_getcommits_Method.php b/src/applications/diffusion/conduit/ConduitAPI_diffusion_getcommits_Method.php
--- a/src/applications/diffusion/conduit/ConduitAPI_diffusion_getcommits_Method.php
+++ b/src/applications/diffusion/conduit/ConduitAPI_diffusion_getcommits_Method.php
@@ -129,6 +129,7 @@
$commits = $this->addRepositoryCommitDataInformation($commits);
$commits = $this->addDifferentialInformation($commits);
+ $commits = $this->addManiphestInformation($commits);
foreach ($commits as $name => $commit) {
$results[$name] = $commit;
@@ -261,4 +262,31 @@
return $commits;
}
+ /**
+ * Enhances the commits list with Maniphest information.
+ */
+ private function addManiphestInformation(array $commits) {
+ $task_type = PhabricatorEdgeConfig::TYPE_COMMIT_HAS_TASK;
+
+ $commit_phids = ipull($commits, 'commitPHID');
+
+ $edge_query = id(new PhabricatorEdgeQuery())
+ ->withSourcePHIDs($commit_phids)
+ ->withEdgeTypes(array($task_type));
+
+ $edges = $edge_query->execute();
+
+ foreach ($commits as $name => $commit) {
+ $task_phids = $edge_query->getDestinationPHIDs(
+ array($commit['commitPHID']),
+ array($task_type));
+
+ $commits[$name] += array(
+ 'taskPHIDs' => $task_phids,
+ );
+ }
+
+ return $commits;
+ }
+
}
File Metadata
Details
Attached
Mime Type
text/x-diff
Storage Engine
amazon-s3
Storage Format
Raw Data
Storage Handle
phabricator/ov/4h/od4g33xdz5vaqynk
Default Alt Text
D7668.diff (1 KB)
Attached To
Mode
D7668: Attach TaskPHIDs to commits in diffusion.getcommits
Attached
Detach File
Event Timeline
Log In to Comment