Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F15453268
D10266.id24715.diff
No One
Temporary
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
D10266.id24715.diff
View Options
diff --git a/src/applications/audit/editor/PhabricatorAuditEditor.php b/src/applications/audit/editor/PhabricatorAuditEditor.php
--- a/src/applications/audit/editor/PhabricatorAuditEditor.php
+++ b/src/applications/audit/editor/PhabricatorAuditEditor.php
@@ -428,6 +428,49 @@
$this->renderInlineCommentsForMail($object, $inlines));
}
+ // Reload the commit to pull commit data.
+ $commit = id(new DiffusionCommitQuery())
+ ->setViewer($this->requireActor())
+ ->withIDs(array($object->getID()))
+ ->needCommitData(true)
+ ->executeOne();
+ $data = $commit->getCommitData();
+
+ $user_phids = array();
+
+ $author_phid = $commit->getAuthorPHID();
+ if ($author_phid) {
+ $user_phids[$commit->getAuthorPHID()][] = pht('Author');
+ }
+
+ $committer_phid = $data->getCommitDetail('committerPHID');
+ if ($committer_phid && ($committer_phid != $author_phid)) {
+ $user_phids[$committer_phid][] = pht('Committer');
+ }
+
+ // TODO: It would be nice to show pusher here too, but that information
+ // is a little tricky to get at right now.
+
+ if ($user_phids) {
+ $handle_phids = array_keys($user_phids);
+ $handles = id(new PhabricatorHandleQuery())
+ ->setViewer($this->requireActor())
+ ->withPHIDs($handle_phids)
+ ->execute();
+
+ $user_info = array();
+ foreach ($user_phids as $phid => $roles) {
+ $user_info[] = pht(
+ '%s (%s)',
+ $handles[$phid]->getName(),
+ implode(', ', $roles));
+ }
+
+ $body->addTextSection(
+ pht('USERS'),
+ implode("\n", $user_info));
+ }
+
$monogram = $object->getRepository()->formatCommitName(
$object->getCommitIdentifier());
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Mar 30, 10:35 AM (1 w, 1 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7388199
Default Alt Text
D10266.id24715.diff (1 KB)
Attached To
Mode
D10266: Add a "USERS" section to audit emails listing commit authors and committers
Attached
Detach File
Event Timeline
Log In to Comment