Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F14025873
D10399.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
D10399.diff
View Options
diff --git a/src/applications/diffusion/conduit/DiffusionQueryCommitsConduitAPIMethod.php b/src/applications/diffusion/conduit/DiffusionQueryCommitsConduitAPIMethod.php
--- a/src/applications/diffusion/conduit/DiffusionQueryCommitsConduitAPIMethod.php
+++ b/src/applications/diffusion/conduit/DiffusionQueryCommitsConduitAPIMethod.php
@@ -22,6 +22,7 @@
'names' => 'optional list<string>',
'repositoryPHID' => 'optional phid',
'needMessages' => 'optional bool',
+ 'bypassCache' => 'optional bool',
) + $this->getPagerParamTypes();
}
@@ -31,6 +32,7 @@
protected function execute(ConduitAPIRequest $request) {
$need_messages = $request->getValue('needMessages');
+ $bypass_cache = $request->getValue('bypassCache');
$query = id(new DiffusionCommitQuery())
->setViewer($request->getUser());
@@ -87,8 +89,35 @@
'uri' => $uri,
'isImporting' => !$commit->isImported(),
'summary' => $commit->getSummary(),
+ 'authorName' => '',
+ 'authorEmail' => '',
+ 'committerName' => '',
+ 'committerEmail' => '',
+ 'hashes' => array(),
);
+ if ($bypass_cache) {
+ $lowlevel_commitref = id(new DiffusionLowLevelCommitQuery())
+ ->setRepository($commit->getRepository())
+ ->withIdentifier($commit->getCommitIdentifier())
+ ->execute();
+
+ $dict['authorName'] = $lowlevel_commitref->getAuthorName();
+ $dict['authorEmail'] = $lowlevel_commitref->getAuthorEmail();
+ $dict['committerName'] = $lowlevel_commitref->getCommitterName();
+ $dict['committerEmail'] = $lowlevel_commitref->getCommitterEmail();
+
+ if ($need_messages) {
+ $dict['message'] = $lowlevel_commitref->getMessage();
+ }
+
+ foreach ($lowlevel_commitref->getHashes() as $hash) {
+ $dict['hashes'][] = array(
+ 'type' => $hash->getHashType(),
+ 'value' => $hash->getHashValue());
+ }
+ }
+
if ($need_messages) {
$commit_data = $commit->getCommitData();
if ($commit_data) {
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Nov 8, 8:57 PM (1 w, 3 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6735745
Default Alt Text
D10399.diff (2 KB)
Attached To
Mode
D10399: Populate results of DiffusionQueryCommitsConduitAPIMethod with DiffusionLowLevelCommitQuery
Attached
Detach File
Event Timeline
Log In to Comment