Allow customized patterns for marking generated files.
Test Plan: Created a listener that adds some patterns to $matches array, reloaded Differential, some changesets were not shown as generated. Reviewers: epriestley Reviewed By: epriestley CC: aran, epriestley, mareksapota Differential Revision: 1200
This commit is contained in:
@@ -540,7 +540,18 @@ class DifferentialChangesetParser {
|
||||
ipull($this->intra, 1),
|
||||
$new_corpus);
|
||||
|
||||
$generated = (strpos($new_corpus_block, '@'.'generated') !== false);
|
||||
$generated_guess = (strpos($new_corpus_block, '@'.'generated') !== false);
|
||||
|
||||
$event = new PhabricatorEvent(
|
||||
PhabricatorEventType::TYPE_DIFFERENTIAL_WILLMARKGENERATED,
|
||||
array(
|
||||
'corpus' => $new_corpus_block,
|
||||
'is_generated' => $generated_guess
|
||||
)
|
||||
);
|
||||
PhutilEventEngine::dispatchEvent($event);
|
||||
|
||||
$generated = $event->getValue('is_generated');
|
||||
|
||||
$this->specialAttributes[self::ATTR_GENERATED] = $generated;
|
||||
}
|
||||
|
||||
@@ -15,10 +15,13 @@ phutil_require_module('phabricator', 'applications/differential/view/inlinecomme
|
||||
phutil_require_module('phabricator', 'applications/files/uri');
|
||||
phutil_require_module('phabricator', 'applications/markup/syntax');
|
||||
phutil_require_module('phabricator', 'infrastructure/diff/engine');
|
||||
phutil_require_module('phabricator', 'infrastructure/events/constant/type');
|
||||
phutil_require_module('phabricator', 'infrastructure/events/event');
|
||||
phutil_require_module('phabricator', 'infrastructure/javelin/markup');
|
||||
phutil_require_module('phabricator', 'storage/queryfx');
|
||||
|
||||
phutil_require_module('phutil', 'error');
|
||||
phutil_require_module('phutil', 'events/engine');
|
||||
phutil_require_module('phutil', 'future');
|
||||
phutil_require_module('phutil', 'markup');
|
||||
phutil_require_module('phutil', 'utils');
|
||||
|
||||
Reference in New Issue
Block a user