Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F14069926
D9169.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
D9169.diff
View Options
diff --git a/src/applications/audit/view/PhabricatorAuditListView.php b/src/applications/audit/view/PhabricatorAuditListView.php
--- a/src/applications/audit/view/PhabricatorAuditListView.php
+++ b/src/applications/audit/view/PhabricatorAuditListView.php
@@ -66,15 +66,27 @@
private function getCommitDescription($phid) {
if ($this->commits === null) {
- return null;
+ return pht('(Unknown Commit)');
}
$commit = idx($this->commits, $phid);
if (!$commit) {
- return null;
+ return pht('(Unknown Commit)');
}
- return $commit->getCommitData()->getSummary();
+ $summary = $commit->getCommitData()->getSummary();
+ if (strlen($summary)) {
+ return $summary;
+ }
+
+ // No summary, so either this is still impoting or just has an empty
+ // commit message.
+
+ if (!$commit->isImported()) {
+ return pht('(Importing Commit...)');
+ } else {
+ return pht('(Untitled Commit)');
+ }
}
public function render() {
@@ -134,14 +146,14 @@
$author_name = $commit->getCommitData()->getAuthorName();
$item = id(new PHUIObjectItemView())
- ->setObjectName($commit_name)
- ->setHeader($commit_desc)
- ->setHref($commit_link)
- ->setBarColor($status_color)
- ->addAttribute($status_text)
- ->addAttribute($reasons)
- ->addIcon('none', $committed)
- ->addByline(pht('Author: %s', $author_name));
+ ->setObjectName($commit_name)
+ ->setHeader($commit_desc)
+ ->setHref($commit_link)
+ ->setBarColor($status_color)
+ ->addAttribute($status_text)
+ ->addAttribute($reasons)
+ ->addIcon('none', $committed)
+ ->addByline(pht('Author: %s', $author_name));
if (!empty($auditors)) {
$item->addAttribute(pht('Auditors: %s', $auditors));
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Nov 21, 10:36 AM (22 h, 16 m)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6713803
Default Alt Text
D9169.diff (1 KB)
Attached To
Mode
D9169: Give audits a clickable commit title, even if they are importing or messageless
Attached
Detach File
Event Timeline
Log In to Comment