mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-21 22:32:41 +01:00
Audit Feed: less verbose when the author is the committer
Summary: If the author and the committer are the same person, do not show them twice. From: UsernameFoo committed <commit hash>: <commit msg> (authored by UsernameFoo). To: UsernameFoo committed <commit hash>: <commit msg> This only affects the feed. | Before | After | |-----------|-----------| | {F342758} | {F342764} | Closes T15528 Test Plan: Do some mixed commits and visit /feed/query/all/. No nuclear implosions. Reviewers: O1 Blessed Committers, speck Reviewed By: O1 Blessed Committers, speck Subscribers: speck, tobiaswiese, Matthew, Cigaryno Maniphest Tasks: T15528 Differential Revision: https://we.phorge.it/D25421
This commit is contained in:
parent
282e37aaf6
commit
775d141fe6
1 changed files with 11 additions and 1 deletions
|
@ -338,7 +338,17 @@ final class PhabricatorAuditTransaction
|
|||
$author = null;
|
||||
}
|
||||
|
||||
if ($author) {
|
||||
// Show both Author and Committer only if they are different.
|
||||
$show_both = $author && $committer;
|
||||
if ($show_both) {
|
||||
if ($new['authorPHID']) {
|
||||
$show_both = $new['authorPHID'] !== $new['committerPHID'];
|
||||
} else if (phutil_nonempty_string($new['authorName'])) {
|
||||
$show_both = $new['authorName'] !== $new['committerName'];
|
||||
}
|
||||
}
|
||||
|
||||
if ($show_both) {
|
||||
$title = pht(
|
||||
'%s committed %s (authored by %s).',
|
||||
$committer,
|
||||
|
|
Loading…
Reference in a new issue