Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F14766207
D10424.id.diff
No One
Temporary
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
D10424.id.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
@@ -35,11 +35,8 @@
$bypass_cache = $request->getValue('bypassCache');
$query = id(new DiffusionCommitQuery())
- ->setViewer($request->getUser());
-
- if ($need_messages) {
- $query->needCommitData(true);
- }
+ ->setViewer($request->getUser())
+ ->needCommitData(true);
$repository_phid = $request->getValue('repositoryPHID');
if ($repository_phid) {
@@ -75,6 +72,8 @@
$data = array();
foreach ($commits as $commit) {
+ $commit_data = $commit->getCommitData();
+
$callsign = $commit->getRepository()->getCallsign();
$identifier = $commit->getCommitIdentifier();
$uri = '/r'.$callsign.$identifier;
@@ -89,10 +88,14 @@
'uri' => $uri,
'isImporting' => !$commit->isImported(),
'summary' => $commit->getSummary(),
- 'authorName' => '',
- 'authorEmail' => '',
- 'committerName' => '',
- 'committerEmail' => '',
+ 'authorPHID' => $commit->getAuthorPHID(),
+ 'committerPHID' => $commit_data->getCommitDetail('committerPHID'),
+ 'author' => $commit_data->getAuthorName(),
+ 'authorName' => $commit_data->getCommitDetail('authorName'),
+ 'authorEmail' => $commit_data->getCommitDetail('authorEmail'),
+ 'committer' => $commit_data->getCommitDetail('committer'),
+ 'committerName' => $commit_data->getCommitDetail('committerName'),
+ 'committerEmail' => $commit_data->getCommitDetail('committerEmail'),
'hashes' => array(),
);
@@ -102,8 +105,10 @@
->withIdentifier($commit->getCommitIdentifier())
->execute();
+ $dict['author'] = $lowlevel_commitref->getAuthor();
$dict['authorName'] = $lowlevel_commitref->getAuthorName();
$dict['authorEmail'] = $lowlevel_commitref->getAuthorEmail();
+ $dict['committer'] = $lowlevel_commitref->getCommitter();
$dict['committerName'] = $lowlevel_commitref->getCommitterName();
$dict['committerEmail'] = $lowlevel_commitref->getCommitterEmail();
@@ -118,13 +123,8 @@
}
}
- if ($need_messages) {
- $commit_data = $commit->getCommitData();
- if ($commit_data) {
- $dict['message'] = $commit_data->getCommitMessage();
- } else {
- $dict['message'] = null;
- }
+ if ($need_messages && !$bypass_cache) {
+ $dict['message'] = $commit_data->getCommitMessage();
}
$data[$commit->getPHID()] = $dict;
diff --git a/src/applications/repository/worker/commitmessageparser/PhabricatorRepositoryCommitMessageParserWorker.php b/src/applications/repository/worker/commitmessageparser/PhabricatorRepositoryCommitMessageParserWorker.php
--- a/src/applications/repository/worker/commitmessageparser/PhabricatorRepositoryCommitMessageParserWorker.php
+++ b/src/applications/repository/worker/commitmessageparser/PhabricatorRepositoryCommitMessageParserWorker.php
@@ -18,6 +18,10 @@
}
$data->setCommitID($commit->getID());
$data->setAuthorName((string)$author);
+
+ $data->setCommitDetail('authorName', $ref->getAuthorName());
+ $data->setCommitDetail('authorEmail', $ref->getAuthorEmail());
+
$data->setCommitDetail(
'authorPHID',
$this->resolveUserPHID($commit, $author));
@@ -26,6 +30,10 @@
if (strlen($committer)) {
$data->setCommitDetail('committer', $committer);
+
+ $data->setCommitDetail('committerName', $ref->getCommitterName());
+ $data->setCommitDetail('committerEmail', $ref->getCommitterEmail());
+
$data->setCommitDetail(
'committerPHID',
$this->resolveUserPHID($commit, $committer));
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Jan 24, 4:16 PM (17 h, 37 m)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7041653
Default Alt Text
D10424.id.diff (3 KB)
Attached To
Mode
D10424: Provide more information from diffusion.querycommits
Attached
Detach File
Event Timeline
Log In to Comment