@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.

Add an explicit warning in the Differential transaction log when users skip review

Summary:
Ref T10233. See PHI231. When users ignore the `arc land` prompt about bad revision states, make it explicitly clear in the transaction log that they broke the rules.

You can currently figure this out by noticing that there's no "This revision is accepted and ready to land." message, but it's unrealistic to expect non-expert users to look for the //absence// of a message to indicate something, and this state change is often relevant.

Test Plan: {F5302351}

Reviewers: amckinley

Reviewed By: amckinley

Maniphest Tasks: T10233

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

+60 -3
+3 -3
resources/celerity/map.php
··· 9 9 'names' => array( 10 10 'conpherence.pkg.css' => 'e68cf1fa', 11 11 'conpherence.pkg.js' => '15191c65', 12 - 'core.pkg.css' => '1a4e0c25', 12 + 'core.pkg.css' => 'fdb27ef9', 13 13 'core.pkg.js' => '4c79d74f', 14 14 'darkconsole.pkg.js' => '1f9a31bc', 15 15 'differential.pkg.css' => '45951e9e', ··· 176 176 'rsrc/css/phui/phui-spacing.css' => '042804d6', 177 177 'rsrc/css/phui/phui-status.css' => 'd5263e49', 178 178 'rsrc/css/phui/phui-tag-view.css' => 'b4719c50', 179 - 'rsrc/css/phui/phui-timeline-view.css' => 'f21db7ca', 179 + 'rsrc/css/phui/phui-timeline-view.css' => 'e2ef62b1', 180 180 'rsrc/css/phui/phui-two-column-view.css' => '44ec4951', 181 181 'rsrc/css/phui/workboards/phui-workboard-color.css' => '783cdff5', 182 182 'rsrc/css/phui/workboards/phui-workboard.css' => '3bc85455', ··· 871 871 'phui-status-list-view-css' => 'd5263e49', 872 872 'phui-tag-view-css' => 'b4719c50', 873 873 'phui-theme-css' => '9f261c6b', 874 - 'phui-timeline-view-css' => 'f21db7ca', 874 + 'phui-timeline-view-css' => 'e2ef62b1', 875 875 'phui-two-column-view-css' => '44ec4951', 876 876 'phui-workboard-color-css' => '783cdff5', 877 877 'phui-workboard-view-css' => '3bc85455',
+2
src/__phutil_library_map__.php
··· 594 594 'DifferentialRevisionUpdateHistoryView' => 'applications/differential/view/DifferentialRevisionUpdateHistoryView.php', 595 595 'DifferentialRevisionViewController' => 'applications/differential/controller/DifferentialRevisionViewController.php', 596 596 'DifferentialRevisionVoidTransaction' => 'applications/differential/xaction/DifferentialRevisionVoidTransaction.php', 597 + 'DifferentialRevisionWrongStateTransaction' => 'applications/differential/xaction/DifferentialRevisionWrongStateTransaction.php', 597 598 'DifferentialSchemaSpec' => 'applications/differential/storage/DifferentialSchemaSpec.php', 598 599 'DifferentialSetDiffPropertyConduitAPIMethod' => 'applications/differential/conduit/DifferentialSetDiffPropertyConduitAPIMethod.php', 599 600 'DifferentialStoredCustomField' => 'applications/differential/customfield/DifferentialStoredCustomField.php', ··· 5647 5648 'DifferentialRevisionUpdateHistoryView' => 'AphrontView', 5648 5649 'DifferentialRevisionViewController' => 'DifferentialController', 5649 5650 'DifferentialRevisionVoidTransaction' => 'DifferentialRevisionTransactionType', 5651 + 'DifferentialRevisionWrongStateTransaction' => 'DifferentialRevisionTransactionType', 5650 5652 'DifferentialSchemaSpec' => 'PhabricatorConfigSchemaSpec', 5651 5653 'DifferentialSetDiffPropertyConduitAPIMethod' => 'DifferentialConduitAPIMethod', 5652 5654 'DifferentialStoredCustomField' => 'DifferentialCustomField',
+10
src/applications/differential/engine/DifferentialDiffExtractionEngine.php
··· 268 268 269 269 $xactions = array(); 270 270 271 + // If the revision isn't closed or "Accepted", write a warning into the 272 + // transaction log. This makes it more clear when users bend the rules. 273 + if (!$revision->isClosed() && !$revision->isAccepted()) { 274 + $wrong_type = DifferentialRevisionWrongStateTransaction::TRANSACTIONTYPE; 275 + 276 + $xactions[] = id(new DifferentialTransaction()) 277 + ->setTransactionType($wrong_type) 278 + ->setNewValue($revision->getModernRevisionStatus()); 279 + } 280 + 271 281 $xactions[] = id(new DifferentialTransaction()) 272 282 ->setTransactionType(DifferentialTransaction::TYPE_UPDATE) 273 283 ->setIgnoreOnNoEffect(true)
+41
src/applications/differential/xaction/DifferentialRevisionWrongStateTransaction.php
··· 1 + <?php 2 + 3 + final class DifferentialRevisionWrongStateTransaction 4 + extends DifferentialRevisionTransactionType { 5 + 6 + const TRANSACTIONTYPE = 'differential.revision.wrong'; 7 + 8 + public function generateOldValue($object) { 9 + return null; 10 + } 11 + 12 + public function generateNewValue($object, $value) { 13 + return $value; 14 + } 15 + 16 + public function getIcon() { 17 + return 'fa-exclamation'; 18 + } 19 + 20 + public function getColor() { 21 + return 'pink'; 22 + } 23 + 24 + public function getActionStrength() { 25 + return 4; 26 + } 27 + 28 + public function getTitle() { 29 + $new_value = $this->getNewValue(); 30 + 31 + $status = DifferentialRevisionStatus::newForStatus($new_value); 32 + 33 + return pht( 34 + 'This revision was not accepted when it landed; it landed in state %s.', 35 + $this->renderValue($status->getDisplayName())); 36 + } 37 + 38 + public function getTitleForFeed() { 39 + return null; 40 + } 41 + }
+4
webroot/rsrc/css/phui/phui-timeline-view.css
··· 315 315 background-color: {$violet}; 316 316 } 317 317 318 + .phui-timeline-icon-fill-pink { 319 + background-color: {$pink}; 320 + } 321 + 318 322 .phui-timeline-icon-fill-grey { 319 323 background-color: #888; 320 324 }