Page MenuHomePhabricator

D9169.id21781.diff
No OneTemporary

D9169.id21781.diff

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

Mime Type
text/plain
Expires
Sun, Nov 10, 8:33 AM (1 w, 3 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6713803
Default Alt Text
D9169.id21781.diff (1 KB)

Event Timeline