@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Show commit audit status in repository history tables, including merge commit lists

Summary:
Fixes T6024. Ref T12121. Currently, we show build status in commit history tables; show audit status alongside it.

Also:

- Change the "Author/Committer" header to just "Author"; I think it's reasonably obvious what "x/y" means (if you can't guess, you can click the commit and likely figure it out) and this gives us a little more space.
- Make the audit list look more like the corresponding list in Differential, with similar formatting.

Test Plan:
- Viewed history of a repostiory, saw audit status.
- Viewed a merge commit, saw audit status in the list of merged commits.
- Viewed a commit search results list.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T12121, T6024

Differential Revision: https://secure.phabricator.com/D17227

+28 -12
+9 -11
src/applications/audit/view/PhabricatorAuditListView.php
··· 139 139 $item = id(new PHUIObjectItemView()) 140 140 ->setObjectName($commit_name) 141 141 ->setHeader($commit_desc) 142 - ->setHref($commit_link); 142 + ->setHref($commit_link) 143 + ->addByline(pht('Author: %s', $author_name)) 144 + ->addIcon('none', $committed); 143 145 144 146 if ($show_drafts) { 145 147 if ($commit->getHasDraft($viewer)) { ··· 147 149 } 148 150 } 149 151 150 - $item 151 - ->addAttribute(pht('Author: %s', $author_name)) 152 - ->addIcon('none', $committed); 153 - 154 152 $audits = $commit->getAudits(); 155 153 $auditor_phids = mpull($audits, 'getAuditorPHID'); 156 154 if ($auditor_phids) { 157 - $item->addByLine( 158 - array( 159 - pht('Auditors:'), 160 - ' ', 161 - $handles->newSublist($auditor_phids)->renderList(), 162 - )); 155 + $auditor_list = $handles->newSublist($auditor_phids) 156 + ->renderList() 157 + ->setAsInline(true); 158 + } else { 159 + $auditor_list = phutil_tag('em', array(), pht('None')); 163 160 } 161 + $item->addAttribute(pht('Auditors: %s', $auditor_list)); 164 162 165 163 if ($status_color) { 166 164 $item->setStatusIcon($status_icon.' '.$status_color, $status_text);
+19 -1
src/applications/diffusion/view/DiffusionHistoryTableView.php
··· 187 187 'type' => $history->getFileType(), 188 188 )); 189 189 190 + $status = $commit->getAuditStatus(); 191 + $icon = PhabricatorAuditCommitStatusConstants::getStatusIcon($status); 192 + $color = PhabricatorAuditCommitStatusConstants::getStatusColor($status); 193 + $name = PhabricatorAuditCommitStatusConstants::getStatusName($status); 194 + 195 + $audit_view = id(new PHUIIconView()) 196 + ->setIcon($icon, $color) 197 + ->addSigil('has-tooltip') 198 + ->setMetadata( 199 + array( 200 + 'tip' => $name, 201 + )); 202 + 190 203 $rows[] = array( 191 204 $graph ? $graph[$ii++] : null, 192 205 $browse, ··· 194 207 $drequest->getRepository(), 195 208 $history->getCommitIdentifier()), 196 209 $build, 210 + $audit_view, 197 211 ($commit ? 198 212 self::linkRevision(idx($this->revisions, $commit->getPHID())) : 199 213 null), ··· 211 225 pht('Commit'), 212 226 null, 213 227 null, 214 - pht('Author/Committer'), 228 + null, 229 + pht('Author'), 215 230 pht('Details'), 216 231 pht('Committed'), 217 232 )); ··· 220 235 'threads', 221 236 'nudgeright', 222 237 '', 238 + 'icon', 223 239 'icon', 224 240 '', 225 241 '', ··· 232 248 true, 233 249 true, 234 250 $has_any_build, 251 + true, 235 252 $show_revisions, 236 253 )); 237 254 $view->setDeviceVisibility( 238 255 array( 239 256 $graph ? true : false, 257 + true, 240 258 true, 241 259 true, 242 260 true,