Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F14837306
D10403.id25027.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
2 KB
Referenced Files
None
Subscribers
None
D10403.id25027.diff
View Options
diff --git a/src/applications/diffusion/data/DiffusionCommitRef.php b/src/applications/diffusion/data/DiffusionCommitRef.php
--- a/src/applications/diffusion/data/DiffusionCommitRef.php
+++ b/src/applications/diffusion/data/DiffusionCommitRef.php
@@ -9,6 +9,25 @@
private $committerEmail;
private $hashes = array();
+ public static function fromConduitResult($result) {
+ $ref = id(new DiffusionCommitRef())
+ ->setCommitterEmail($result['committerEmail'])
+ ->setCommitterName($result['committerName'])
+ ->setAuthorEmail($result['authorEmail'])
+ ->setAuthorName($result['authorName'])
+ ->setMessage($result['message']);
+
+ $hashes = array();
+ foreach ($result['hashes'] as $hash_result) {
+ $hashes[] = id(new DiffusionCommitHash())
+ ->setHashType($hash_result['type'])
+ ->setHashValue($hash_result['value']);
+ }
+
+ $ref->setHashes($hashes);
+ return $ref;
+ }
+
public function setHashes(array $hashes) {
$this->hashes = $hashes;
return $this;
diff --git a/src/applications/repository/management/PhabricatorRepositoryManagementLookupUsersWorkflow.php b/src/applications/repository/management/PhabricatorRepositoryManagementLookupUsersWorkflow.php
--- a/src/applications/repository/management/PhabricatorRepositoryManagementLookupUsersWorkflow.php
+++ b/src/applications/repository/management/PhabricatorRepositoryManagementLookupUsersWorkflow.php
@@ -33,10 +33,17 @@
"%s\n",
pht('Examining commit %s...', $name));
- $ref = id(new DiffusionLowLevelCommitQuery())
- ->setRepository($repo)
- ->withIdentifier($commit->getCommitIdentifier())
- ->execute();
+ $conduit_call = id(new ConduitCall(
+ 'diffusion.querycommits',
+ array(
+ 'repositoryPHID' => $repo->getPHID(),
+ 'phids' => array($commit->getPHID()),
+ 'bypassCache' => true,
+ )));
+ $conduit_call->setUser(PhabricatorUser::getOmnipotentUser());
+ $refs_raw = $conduit_call->execute();
+
+ $ref = DiffusionCommitRef::fromConduitResult(head($refs_raw['data']));
$author = $ref->getAuthor();
$console->writeOut(
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Feb 1, 8:11 AM (15 h, 30 m)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7081247
Default Alt Text
D10403.id25027.diff (2 KB)
Attached To
Mode
D10403: Update PhabricatorRepositoryManagementLookupUsersWorkflow to use ConduitCall
Attached
Detach File
Event Timeline
Log In to Comment