1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-12-04 04:32:43 +01:00
phorge-phorge/src/applications/differential/storage
epriestley af295341c8 Classify changesets as "generated" at creation time, in addition to display time
Summary:
Ref T13130. See PHI251. Currently, changesets are marked as "generated" (i.e., the file contains generated code and does not normally need to be reviewed) at display time.

An install would like support for having Owners rules ignore generated files. Additionally, future changes anticipate making "generated" and some other similar behaviors more flexible and more general.

To support these, move toward a world where:

  - Changesets have "attributes": today, generated. In the future, perhaps: third-party, highlight-as, encoding, enormous-text-file, etc.
  - Attributes are either "trusted" (usually: the server assigned the attribute) or "untrusted" (usually: the client assigned the attribute). For attributes like "highlight-as", this isn't relevant, but I'd like to provide tools so that you can't make `arc` mark every file as "generated" and sneak past review rules in the future.

Here, the `differential.generated-paths` config can mark a file as "generated" with a trusted attribute. The `@generated`-in-content rule can mark a file as "generated" with an untrusted attribute.

Putting these attributes on changesets at creation time instead of display time will let Owners interact with changesets cheaply: it won't have to render an entire changeset just to figure out if it's generated or not.

Test Plan:
  - Created a revision touching several files, some generated and some not.
  - Saw the generated files get marked properly with attribute metadata in the database, and show/fold as "Generated" in the UI.

Reviewers: amckinley

Reviewed By: amckinley

Maniphest Tasks: T13130

Differential Revision: https://secure.phabricator.com/D19425
2018-05-05 08:46:25 -07:00
..
__tests__ Completely remove the legacy hunk table 2018-02-10 16:12:50 -08:00
DifferentialAffectedPath.php Fix visiblity of LiskDAO::getConfiguration() 2015-01-14 06:54:13 +11:00
DifferentialChangeset.php Classify changesets as "generated" at creation time, in addition to display time 2018-05-05 08:46:25 -07:00
DifferentialCustomFieldNumericIndex.php Various linter fixes. 2014-02-26 12:44:58 -08:00
DifferentialCustomFieldStorage.php Various linter fixes. 2014-02-26 12:44:58 -08:00
DifferentialCustomFieldStringIndex.php Various linter fixes. 2014-02-26 12:44:58 -08:00
DifferentialDAO.php Delete license headers from files 2012-11-05 11:16:51 -08:00
DifferentialDiff.php Classify changesets as "generated" at creation time, in addition to display time 2018-05-05 08:46:25 -07:00
DifferentialDiffProperty.php Fix almost all remaining schemata issues 2014-10-01 08:18:36 -07:00
DifferentialDiffTransaction.php Differential - make DifferentialDiffEditor into a real transaction editor. 2014-11-18 15:32:23 -08:00
DifferentialHiddenComment.php Allow inline comments to be individually hidden 2015-05-27 10:28:38 -07:00
DifferentialHunk.php Add an "--auto" flag to "bin/differential migrate-hunk" 2018-04-16 12:27:26 -07:00
DifferentialInlineComment.php Build a page for viewing all inline comments 2017-06-12 11:31:20 -07:00
DifferentialReviewer.php Allow custom actions in Differential to explicitly override "accept" stickiness 2018-03-12 17:10:43 -07:00
DifferentialRevision.php Remove "Large Changes" documentation and make some minor behavioral improvements 2018-04-05 06:40:46 -07:00
DifferentialSchemaSpec.php Add "persistence" types (data, cache, or index) to tables, and tweak what "storage dump" dumps 2017-10-04 12:09:33 -07:00
DifferentialTransaction.php Mostly modularize the Differential "update" transaction 2018-03-06 09:10:32 -08:00
DifferentialTransactionComment.php Make inline comment preview and submission mostly work on EditEngine 2016-12-31 10:10:29 -08:00