mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-18 19:40:55 +01:00
Modularize all DifferentialRevision fields
Summary: Ref T8726. Make all the DifferentialRevision stuff modular. Test Plan: - Created a rule with all fields. - Ran upgrade. - Saw all fields preserved with new modular versions. - Used test console to run rule with all fields, verified field values as broadly sensible. Reviewers: btrahan Reviewed By: btrahan Subscribers: epriestley Maniphest Tasks: T8726 Differential Revision: https://secure.phabricator.com/D13598
This commit is contained in:
parent
c013108675
commit
00b98eca54
19 changed files with 518 additions and 97 deletions
90
resources/sql/autopatches/20150708.herald.1.sql
Normal file
90
resources/sql/autopatches/20150708.herald.1.sql
Normal file
|
@ -0,0 +1,90 @@
|
||||||
|
UPDATE {$NAMESPACE}_herald.herald_condition c
|
||||||
|
JOIN {$NAMESPACE}_herald.herald_rule r
|
||||||
|
ON c.ruleID = r.id
|
||||||
|
SET c.fieldName = 'differential.revision.diff.affected'
|
||||||
|
WHERE r.contentType = 'differential'
|
||||||
|
AND c.fieldName = 'diff-file';
|
||||||
|
|
||||||
|
UPDATE {$NAMESPACE}_herald.herald_condition c
|
||||||
|
JOIN {$NAMESPACE}_herald.herald_rule r
|
||||||
|
ON c.ruleID = r.id
|
||||||
|
SET c.fieldName = 'differential.revision.author'
|
||||||
|
WHERE r.contentType = 'differential'
|
||||||
|
AND c.fieldName = 'author';
|
||||||
|
|
||||||
|
UPDATE {$NAMESPACE}_herald.herald_condition c
|
||||||
|
JOIN {$NAMESPACE}_herald.herald_rule r
|
||||||
|
ON c.ruleID = r.id
|
||||||
|
SET c.fieldName = 'differential.revision.author.projects'
|
||||||
|
WHERE r.contentType = 'differential'
|
||||||
|
AND c.fieldName = 'authorprojects';
|
||||||
|
|
||||||
|
UPDATE {$NAMESPACE}_herald.herald_condition c
|
||||||
|
JOIN {$NAMESPACE}_herald.herald_rule r
|
||||||
|
ON c.ruleID = r.id
|
||||||
|
SET c.fieldName = 'differential.revision.diff.new'
|
||||||
|
WHERE r.contentType = 'differential'
|
||||||
|
AND c.fieldName = 'diff-added-content';
|
||||||
|
|
||||||
|
UPDATE {$NAMESPACE}_herald.herald_condition c
|
||||||
|
JOIN {$NAMESPACE}_herald.herald_rule r
|
||||||
|
ON c.ruleID = r.id
|
||||||
|
SET c.fieldName = 'differential.revision.diff.content'
|
||||||
|
WHERE r.contentType = 'differential'
|
||||||
|
AND c.fieldName = 'diff-content';
|
||||||
|
|
||||||
|
UPDATE {$NAMESPACE}_herald.herald_condition c
|
||||||
|
JOIN {$NAMESPACE}_herald.herald_rule r
|
||||||
|
ON c.ruleID = r.id
|
||||||
|
SET c.fieldName = 'differential.revision.diff.old'
|
||||||
|
WHERE r.contentType = 'differential'
|
||||||
|
AND c.fieldName = 'diff-removed-content';
|
||||||
|
|
||||||
|
UPDATE {$NAMESPACE}_herald.herald_condition c
|
||||||
|
JOIN {$NAMESPACE}_herald.herald_rule r
|
||||||
|
ON c.ruleID = r.id
|
||||||
|
SET c.fieldName = 'differential.revision.package'
|
||||||
|
WHERE r.contentType = 'differential'
|
||||||
|
AND c.fieldName = 'affected-package';
|
||||||
|
|
||||||
|
UPDATE {$NAMESPACE}_herald.herald_condition c
|
||||||
|
JOIN {$NAMESPACE}_herald.herald_rule r
|
||||||
|
ON c.ruleID = r.id
|
||||||
|
SET c.fieldName = 'differential.revision.repository'
|
||||||
|
WHERE r.contentType = 'differential'
|
||||||
|
AND c.fieldName = 'repository';
|
||||||
|
|
||||||
|
UPDATE {$NAMESPACE}_herald.herald_condition c
|
||||||
|
JOIN {$NAMESPACE}_herald.herald_rule r
|
||||||
|
ON c.ruleID = r.id
|
||||||
|
SET c.fieldName = 'differential.revision.repository.projects'
|
||||||
|
WHERE r.contentType = 'differential'
|
||||||
|
AND c.fieldName = 'repository-projects';
|
||||||
|
|
||||||
|
UPDATE {$NAMESPACE}_herald.herald_condition c
|
||||||
|
JOIN {$NAMESPACE}_herald.herald_rule r
|
||||||
|
ON c.ruleID = r.id
|
||||||
|
SET c.fieldName = 'differential.revision.reviewers'
|
||||||
|
WHERE r.contentType = 'differential'
|
||||||
|
AND c.fieldName = 'reviewers';
|
||||||
|
|
||||||
|
UPDATE {$NAMESPACE}_herald.herald_condition c
|
||||||
|
JOIN {$NAMESPACE}_herald.herald_rule r
|
||||||
|
ON c.ruleID = r.id
|
||||||
|
SET c.fieldName = 'differential.revision.summary'
|
||||||
|
WHERE r.contentType = 'differential'
|
||||||
|
AND c.fieldName = 'body';
|
||||||
|
|
||||||
|
UPDATE {$NAMESPACE}_herald.herald_condition c
|
||||||
|
JOIN {$NAMESPACE}_herald.herald_rule r
|
||||||
|
ON c.ruleID = r.id
|
||||||
|
SET c.fieldName = 'differential.revision.title'
|
||||||
|
WHERE r.contentType = 'differential'
|
||||||
|
AND c.fieldName = 'title';
|
||||||
|
|
||||||
|
UPDATE {$NAMESPACE}_herald.herald_condition c
|
||||||
|
JOIN {$NAMESPACE}_herald.herald_rule r
|
||||||
|
ON c.ruleID = r.id
|
||||||
|
SET c.fieldName = 'differential.revision.package.owners'
|
||||||
|
WHERE r.contentType = 'differential'
|
||||||
|
AND c.fieldName = 'affected-package-owner';
|
|
@ -436,7 +436,13 @@ phutil_register_library_map(array(
|
||||||
'DifferentialReviewersField' => 'applications/differential/customfield/DifferentialReviewersField.php',
|
'DifferentialReviewersField' => 'applications/differential/customfield/DifferentialReviewersField.php',
|
||||||
'DifferentialReviewersView' => 'applications/differential/view/DifferentialReviewersView.php',
|
'DifferentialReviewersView' => 'applications/differential/view/DifferentialReviewersView.php',
|
||||||
'DifferentialRevision' => 'applications/differential/storage/DifferentialRevision.php',
|
'DifferentialRevision' => 'applications/differential/storage/DifferentialRevision.php',
|
||||||
|
'DifferentialRevisionAffectedFilesHeraldField' => 'applications/differential/herald/DifferentialRevisionAffectedFilesHeraldField.php',
|
||||||
|
'DifferentialRevisionAuthorHeraldField' => 'applications/differential/herald/DifferentialRevisionAuthorHeraldField.php',
|
||||||
|
'DifferentialRevisionAuthorProjectsHeraldField' => 'applications/differential/herald/DifferentialRevisionAuthorProjectsHeraldField.php',
|
||||||
'DifferentialRevisionCloseDetailsController' => 'applications/differential/controller/DifferentialRevisionCloseDetailsController.php',
|
'DifferentialRevisionCloseDetailsController' => 'applications/differential/controller/DifferentialRevisionCloseDetailsController.php',
|
||||||
|
'DifferentialRevisionContentAddedHeraldField' => 'applications/differential/herald/DifferentialRevisionContentAddedHeraldField.php',
|
||||||
|
'DifferentialRevisionContentHeraldField' => 'applications/differential/herald/DifferentialRevisionContentHeraldField.php',
|
||||||
|
'DifferentialRevisionContentRemovedHeraldField' => 'applications/differential/herald/DifferentialRevisionContentRemovedHeraldField.php',
|
||||||
'DifferentialRevisionControlSystem' => 'applications/differential/constants/DifferentialRevisionControlSystem.php',
|
'DifferentialRevisionControlSystem' => 'applications/differential/constants/DifferentialRevisionControlSystem.php',
|
||||||
'DifferentialRevisionDependedOnByRevisionEdgeType' => 'applications/differential/edge/DifferentialRevisionDependedOnByRevisionEdgeType.php',
|
'DifferentialRevisionDependedOnByRevisionEdgeType' => 'applications/differential/edge/DifferentialRevisionDependedOnByRevisionEdgeType.php',
|
||||||
'DifferentialRevisionDependsOnRevisionEdgeType' => 'applications/differential/edge/DifferentialRevisionDependsOnRevisionEdgeType.php',
|
'DifferentialRevisionDependsOnRevisionEdgeType' => 'applications/differential/edge/DifferentialRevisionDependsOnRevisionEdgeType.php',
|
||||||
|
@ -445,15 +451,23 @@ phutil_register_library_map(array(
|
||||||
'DifferentialRevisionHasCommitEdgeType' => 'applications/differential/edge/DifferentialRevisionHasCommitEdgeType.php',
|
'DifferentialRevisionHasCommitEdgeType' => 'applications/differential/edge/DifferentialRevisionHasCommitEdgeType.php',
|
||||||
'DifferentialRevisionHasReviewerEdgeType' => 'applications/differential/edge/DifferentialRevisionHasReviewerEdgeType.php',
|
'DifferentialRevisionHasReviewerEdgeType' => 'applications/differential/edge/DifferentialRevisionHasReviewerEdgeType.php',
|
||||||
'DifferentialRevisionHasTaskEdgeType' => 'applications/differential/edge/DifferentialRevisionHasTaskEdgeType.php',
|
'DifferentialRevisionHasTaskEdgeType' => 'applications/differential/edge/DifferentialRevisionHasTaskEdgeType.php',
|
||||||
|
'DifferentialRevisionHeraldField' => 'applications/differential/herald/DifferentialRevisionHeraldField.php',
|
||||||
'DifferentialRevisionIDField' => 'applications/differential/customfield/DifferentialRevisionIDField.php',
|
'DifferentialRevisionIDField' => 'applications/differential/customfield/DifferentialRevisionIDField.php',
|
||||||
'DifferentialRevisionLandController' => 'applications/differential/controller/DifferentialRevisionLandController.php',
|
'DifferentialRevisionLandController' => 'applications/differential/controller/DifferentialRevisionLandController.php',
|
||||||
'DifferentialRevisionListController' => 'applications/differential/controller/DifferentialRevisionListController.php',
|
'DifferentialRevisionListController' => 'applications/differential/controller/DifferentialRevisionListController.php',
|
||||||
'DifferentialRevisionListView' => 'applications/differential/view/DifferentialRevisionListView.php',
|
'DifferentialRevisionListView' => 'applications/differential/view/DifferentialRevisionListView.php',
|
||||||
'DifferentialRevisionMailReceiver' => 'applications/differential/mail/DifferentialRevisionMailReceiver.php',
|
'DifferentialRevisionMailReceiver' => 'applications/differential/mail/DifferentialRevisionMailReceiver.php',
|
||||||
'DifferentialRevisionPHIDType' => 'applications/differential/phid/DifferentialRevisionPHIDType.php',
|
'DifferentialRevisionPHIDType' => 'applications/differential/phid/DifferentialRevisionPHIDType.php',
|
||||||
|
'DifferentialRevisionPackageHeraldField' => 'applications/differential/herald/DifferentialRevisionPackageHeraldField.php',
|
||||||
|
'DifferentialRevisionPackageOwnerHeraldField' => 'applications/differential/herald/DifferentialRevisionPackageOwnerHeraldField.php',
|
||||||
'DifferentialRevisionQuery' => 'applications/differential/query/DifferentialRevisionQuery.php',
|
'DifferentialRevisionQuery' => 'applications/differential/query/DifferentialRevisionQuery.php',
|
||||||
|
'DifferentialRevisionRepositoryHeraldField' => 'applications/differential/herald/DifferentialRevisionRepositoryHeraldField.php',
|
||||||
|
'DifferentialRevisionRepositoryProjectsHeraldField' => 'applications/differential/herald/DifferentialRevisionRepositoryProjectsHeraldField.php',
|
||||||
|
'DifferentialRevisionReviewersHeraldField' => 'applications/differential/herald/DifferentialRevisionReviewersHeraldField.php',
|
||||||
'DifferentialRevisionSearchEngine' => 'applications/differential/query/DifferentialRevisionSearchEngine.php',
|
'DifferentialRevisionSearchEngine' => 'applications/differential/query/DifferentialRevisionSearchEngine.php',
|
||||||
'DifferentialRevisionStatus' => 'applications/differential/constants/DifferentialRevisionStatus.php',
|
'DifferentialRevisionStatus' => 'applications/differential/constants/DifferentialRevisionStatus.php',
|
||||||
|
'DifferentialRevisionSummaryHeraldField' => 'applications/differential/herald/DifferentialRevisionSummaryHeraldField.php',
|
||||||
|
'DifferentialRevisionTitleHeraldField' => 'applications/differential/herald/DifferentialRevisionTitleHeraldField.php',
|
||||||
'DifferentialRevisionUpdateHistoryView' => 'applications/differential/view/DifferentialRevisionUpdateHistoryView.php',
|
'DifferentialRevisionUpdateHistoryView' => 'applications/differential/view/DifferentialRevisionUpdateHistoryView.php',
|
||||||
'DifferentialRevisionViewController' => 'applications/differential/controller/DifferentialRevisionViewController.php',
|
'DifferentialRevisionViewController' => 'applications/differential/controller/DifferentialRevisionViewController.php',
|
||||||
'DifferentialSchemaSpec' => 'applications/differential/storage/DifferentialSchemaSpec.php',
|
'DifferentialSchemaSpec' => 'applications/differential/storage/DifferentialSchemaSpec.php',
|
||||||
|
@ -971,7 +985,7 @@ phutil_register_library_map(array(
|
||||||
'HeraldDAO' => 'applications/herald/storage/HeraldDAO.php',
|
'HeraldDAO' => 'applications/herald/storage/HeraldDAO.php',
|
||||||
'HeraldDifferentialAdapter' => 'applications/differential/herald/HeraldDifferentialAdapter.php',
|
'HeraldDifferentialAdapter' => 'applications/differential/herald/HeraldDifferentialAdapter.php',
|
||||||
'HeraldDifferentialDiffAdapter' => 'applications/differential/herald/HeraldDifferentialDiffAdapter.php',
|
'HeraldDifferentialDiffAdapter' => 'applications/differential/herald/HeraldDifferentialDiffAdapter.php',
|
||||||
'HeraldDifferentialRevisionAdapter' => 'applications/herald/adapter/HeraldDifferentialRevisionAdapter.php',
|
'HeraldDifferentialRevisionAdapter' => 'applications/differential/herald/HeraldDifferentialRevisionAdapter.php',
|
||||||
'HeraldDisableController' => 'applications/herald/controller/HeraldDisableController.php',
|
'HeraldDisableController' => 'applications/herald/controller/HeraldDisableController.php',
|
||||||
'HeraldEffect' => 'applications/herald/engine/HeraldEffect.php',
|
'HeraldEffect' => 'applications/herald/engine/HeraldEffect.php',
|
||||||
'HeraldEngine' => 'applications/herald/engine/HeraldEngine.php',
|
'HeraldEngine' => 'applications/herald/engine/HeraldEngine.php',
|
||||||
|
@ -3905,7 +3919,13 @@ phutil_register_library_map(array(
|
||||||
'PhabricatorDestructibleInterface',
|
'PhabricatorDestructibleInterface',
|
||||||
'PhabricatorProjectInterface',
|
'PhabricatorProjectInterface',
|
||||||
),
|
),
|
||||||
|
'DifferentialRevisionAffectedFilesHeraldField' => 'DifferentialRevisionHeraldField',
|
||||||
|
'DifferentialRevisionAuthorHeraldField' => 'DifferentialRevisionHeraldField',
|
||||||
|
'DifferentialRevisionAuthorProjectsHeraldField' => 'DifferentialRevisionHeraldField',
|
||||||
'DifferentialRevisionCloseDetailsController' => 'DifferentialController',
|
'DifferentialRevisionCloseDetailsController' => 'DifferentialController',
|
||||||
|
'DifferentialRevisionContentAddedHeraldField' => 'DifferentialRevisionHeraldField',
|
||||||
|
'DifferentialRevisionContentHeraldField' => 'DifferentialRevisionHeraldField',
|
||||||
|
'DifferentialRevisionContentRemovedHeraldField' => 'DifferentialRevisionHeraldField',
|
||||||
'DifferentialRevisionControlSystem' => 'Phobject',
|
'DifferentialRevisionControlSystem' => 'Phobject',
|
||||||
'DifferentialRevisionDependedOnByRevisionEdgeType' => 'PhabricatorEdgeType',
|
'DifferentialRevisionDependedOnByRevisionEdgeType' => 'PhabricatorEdgeType',
|
||||||
'DifferentialRevisionDependsOnRevisionEdgeType' => 'PhabricatorEdgeType',
|
'DifferentialRevisionDependsOnRevisionEdgeType' => 'PhabricatorEdgeType',
|
||||||
|
@ -3914,15 +3934,23 @@ phutil_register_library_map(array(
|
||||||
'DifferentialRevisionHasCommitEdgeType' => 'PhabricatorEdgeType',
|
'DifferentialRevisionHasCommitEdgeType' => 'PhabricatorEdgeType',
|
||||||
'DifferentialRevisionHasReviewerEdgeType' => 'PhabricatorEdgeType',
|
'DifferentialRevisionHasReviewerEdgeType' => 'PhabricatorEdgeType',
|
||||||
'DifferentialRevisionHasTaskEdgeType' => 'PhabricatorEdgeType',
|
'DifferentialRevisionHasTaskEdgeType' => 'PhabricatorEdgeType',
|
||||||
|
'DifferentialRevisionHeraldField' => 'HeraldField',
|
||||||
'DifferentialRevisionIDField' => 'DifferentialCustomField',
|
'DifferentialRevisionIDField' => 'DifferentialCustomField',
|
||||||
'DifferentialRevisionLandController' => 'DifferentialController',
|
'DifferentialRevisionLandController' => 'DifferentialController',
|
||||||
'DifferentialRevisionListController' => 'DifferentialController',
|
'DifferentialRevisionListController' => 'DifferentialController',
|
||||||
'DifferentialRevisionListView' => 'AphrontView',
|
'DifferentialRevisionListView' => 'AphrontView',
|
||||||
'DifferentialRevisionMailReceiver' => 'PhabricatorObjectMailReceiver',
|
'DifferentialRevisionMailReceiver' => 'PhabricatorObjectMailReceiver',
|
||||||
'DifferentialRevisionPHIDType' => 'PhabricatorPHIDType',
|
'DifferentialRevisionPHIDType' => 'PhabricatorPHIDType',
|
||||||
|
'DifferentialRevisionPackageHeraldField' => 'DifferentialRevisionHeraldField',
|
||||||
|
'DifferentialRevisionPackageOwnerHeraldField' => 'DifferentialRevisionHeraldField',
|
||||||
'DifferentialRevisionQuery' => 'PhabricatorCursorPagedPolicyAwareQuery',
|
'DifferentialRevisionQuery' => 'PhabricatorCursorPagedPolicyAwareQuery',
|
||||||
|
'DifferentialRevisionRepositoryHeraldField' => 'DifferentialRevisionHeraldField',
|
||||||
|
'DifferentialRevisionRepositoryProjectsHeraldField' => 'DifferentialRevisionHeraldField',
|
||||||
|
'DifferentialRevisionReviewersHeraldField' => 'DifferentialRevisionHeraldField',
|
||||||
'DifferentialRevisionSearchEngine' => 'PhabricatorApplicationSearchEngine',
|
'DifferentialRevisionSearchEngine' => 'PhabricatorApplicationSearchEngine',
|
||||||
'DifferentialRevisionStatus' => 'Phobject',
|
'DifferentialRevisionStatus' => 'Phobject',
|
||||||
|
'DifferentialRevisionSummaryHeraldField' => 'DifferentialRevisionHeraldField',
|
||||||
|
'DifferentialRevisionTitleHeraldField' => 'DifferentialRevisionHeraldField',
|
||||||
'DifferentialRevisionUpdateHistoryView' => 'AphrontView',
|
'DifferentialRevisionUpdateHistoryView' => 'AphrontView',
|
||||||
'DifferentialRevisionViewController' => 'DifferentialController',
|
'DifferentialRevisionViewController' => 'DifferentialController',
|
||||||
'DifferentialSchemaSpec' => 'PhabricatorConfigSchemaSpec',
|
'DifferentialSchemaSpec' => 'PhabricatorConfigSchemaSpec',
|
||||||
|
|
|
@ -0,0 +1,30 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
final class DifferentialRevisionAffectedFilesHeraldField
|
||||||
|
extends DifferentialRevisionHeraldField {
|
||||||
|
|
||||||
|
const FIELDCONST = 'differential.revision.diff.affected';
|
||||||
|
|
||||||
|
public function getHeraldFieldName() {
|
||||||
|
return pht('Affected files');
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getHeraldFieldValue($object) {
|
||||||
|
return $this->getAdapter()->loadAffectedPaths();
|
||||||
|
}
|
||||||
|
|
||||||
|
protected function getHeraldFieldStandardConditions() {
|
||||||
|
return self::STANDARD_TEXT_LIST;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getHeraldFieldValueType($condition) {
|
||||||
|
switch ($condition) {
|
||||||
|
case HeraldAdapter::CONDITION_EXISTS:
|
||||||
|
case HeraldAdapter::CONDITION_NOT_EXISTS:
|
||||||
|
return HeraldAdapter::VALUE_NONE;
|
||||||
|
default:
|
||||||
|
return HeraldAdapter::VALUE_TEXT;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,24 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
final class DifferentialRevisionAuthorHeraldField
|
||||||
|
extends DifferentialRevisionHeraldField {
|
||||||
|
|
||||||
|
const FIELDCONST = 'differential.revision.author';
|
||||||
|
|
||||||
|
public function getHeraldFieldName() {
|
||||||
|
return pht('Author');
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getHeraldFieldValue($object) {
|
||||||
|
return $object->getAuthorPHID();
|
||||||
|
}
|
||||||
|
|
||||||
|
protected function getHeraldFieldStandardConditions() {
|
||||||
|
return self::STANDARD_PHID;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getHeraldFieldValueType($condition) {
|
||||||
|
return HeraldAdapter::VALUE_USER;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,32 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
final class DifferentialRevisionAuthorProjectsHeraldField
|
||||||
|
extends DifferentialRevisionHeraldField {
|
||||||
|
|
||||||
|
const FIELDCONST = 'differential.revision.author.projects';
|
||||||
|
|
||||||
|
public function getHeraldFieldName() {
|
||||||
|
return pht("Author's projects");
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getHeraldFieldValue($object) {
|
||||||
|
return PhabricatorEdgeQuery::loadDestinationPHIDs(
|
||||||
|
$object->getAuthorPHID(),
|
||||||
|
PhabricatorProjectMemberOfProjectEdgeType::EDGECONST);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected function getHeraldFieldStandardConditions() {
|
||||||
|
return self::STANDARD_LIST;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getHeraldFieldValueType($condition) {
|
||||||
|
switch ($condition) {
|
||||||
|
case HeraldAdapter::CONDITION_EXISTS:
|
||||||
|
case HeraldAdapter::CONDITION_NOT_EXISTS:
|
||||||
|
return HeraldAdapter::VALUE_NONE;
|
||||||
|
default:
|
||||||
|
return HeraldAdapter::VALUE_PROJECT;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,24 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
final class DifferentialRevisionContentAddedHeraldField
|
||||||
|
extends DifferentialRevisionHeraldField {
|
||||||
|
|
||||||
|
const FIELDCONST = 'differential.revision.diff.new';
|
||||||
|
|
||||||
|
public function getHeraldFieldName() {
|
||||||
|
return pht('Added file content');
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getHeraldFieldValue($object) {
|
||||||
|
return $this->getAdapter()->loadAddedContentDictionary();
|
||||||
|
}
|
||||||
|
|
||||||
|
protected function getHeraldFieldStandardConditions() {
|
||||||
|
return self::STANDARD_TEXT_MAP;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getHeraldFieldValueType($condition) {
|
||||||
|
return HeraldAdapter::VALUE_TEXT;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,24 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
final class DifferentialRevisionContentHeraldField
|
||||||
|
extends DifferentialRevisionHeraldField {
|
||||||
|
|
||||||
|
const FIELDCONST = 'differential.revision.diff.content';
|
||||||
|
|
||||||
|
public function getHeraldFieldName() {
|
||||||
|
return pht('Changed file content');
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getHeraldFieldValue($object) {
|
||||||
|
return $this->getAdapter()->loadContentDictionary();
|
||||||
|
}
|
||||||
|
|
||||||
|
protected function getHeraldFieldStandardConditions() {
|
||||||
|
return self::STANDARD_TEXT_MAP;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getHeraldFieldValueType($condition) {
|
||||||
|
return HeraldAdapter::VALUE_TEXT;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,24 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
final class DifferentialRevisionContentRemovedHeraldField
|
||||||
|
extends DifferentialRevisionHeraldField {
|
||||||
|
|
||||||
|
const FIELDCONST = 'differential.revision.diff.old';
|
||||||
|
|
||||||
|
public function getHeraldFieldName() {
|
||||||
|
return pht('Removed file content');
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getHeraldFieldValue($object) {
|
||||||
|
return $this->getAdapter()->loadRemovedContentDictionary();
|
||||||
|
}
|
||||||
|
|
||||||
|
protected function getHeraldFieldStandardConditions() {
|
||||||
|
return self::STANDARD_TEXT_MAP;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getHeraldFieldValueType($condition) {
|
||||||
|
return HeraldAdapter::VALUE_TEXT;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,9 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
abstract class DifferentialRevisionHeraldField extends HeraldField {
|
||||||
|
|
||||||
|
public function supportsObject($object) {
|
||||||
|
return ($object instanceof DifferentialRevision);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,31 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
final class DifferentialRevisionPackageHeraldField
|
||||||
|
extends DifferentialRevisionHeraldField {
|
||||||
|
|
||||||
|
const FIELDCONST = 'differential.revision.package';
|
||||||
|
|
||||||
|
public function getHeraldFieldName() {
|
||||||
|
return pht('Affected packages');
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getHeraldFieldValue($object) {
|
||||||
|
$packages = $this->getAdapter()->loadAffectedPackages();
|
||||||
|
return mpull($packages, 'getPHID');
|
||||||
|
}
|
||||||
|
|
||||||
|
protected function getHeraldFieldStandardConditions() {
|
||||||
|
return self::STANDARD_LIST;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getHeraldFieldValueType($condition) {
|
||||||
|
switch ($condition) {
|
||||||
|
case HeraldAdapter::CONDITION_EXISTS:
|
||||||
|
case HeraldAdapter::CONDITION_NOT_EXISTS:
|
||||||
|
return HeraldAdapter::VALUE_NONE;
|
||||||
|
default:
|
||||||
|
return HeraldAdapter::VALUE_OWNERS_PACKAGE;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,36 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
final class DifferentialRevisionPackageOwnerHeraldField
|
||||||
|
extends DifferentialRevisionHeraldField {
|
||||||
|
|
||||||
|
const FIELDCONST = 'differential.revision.package.owners';
|
||||||
|
|
||||||
|
public function getHeraldFieldName() {
|
||||||
|
return pht('Affected package owners');
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getHeraldFieldValue($object) {
|
||||||
|
$packages = $this->getAdapter()->loadAffectedPackages();
|
||||||
|
if (!$packages) {
|
||||||
|
return array();
|
||||||
|
}
|
||||||
|
|
||||||
|
$owners = PhabricatorOwnersOwner::loadAllForPackages($packages);
|
||||||
|
return mpull($owners, 'getUserPHID');
|
||||||
|
}
|
||||||
|
|
||||||
|
protected function getHeraldFieldStandardConditions() {
|
||||||
|
return self::STANDARD_LIST;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getHeraldFieldValueType($condition) {
|
||||||
|
switch ($condition) {
|
||||||
|
case HeraldAdapter::CONDITION_EXISTS:
|
||||||
|
case HeraldAdapter::CONDITION_NOT_EXISTS:
|
||||||
|
return HeraldAdapter::VALUE_NONE;
|
||||||
|
default:
|
||||||
|
return HeraldAdapter::VALUE_USER_OR_PROJECT;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,36 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
final class DifferentialRevisionRepositoryHeraldField
|
||||||
|
extends DifferentialRevisionHeraldField {
|
||||||
|
|
||||||
|
const FIELDCONST = 'differential.revision.repository';
|
||||||
|
|
||||||
|
public function getHeraldFieldName() {
|
||||||
|
return pht('Repository');
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getHeraldFieldValue($object) {
|
||||||
|
$repository = $this->getAdapter()->loadRepository();
|
||||||
|
|
||||||
|
if (!$repository) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
return $repository->getPHID();
|
||||||
|
}
|
||||||
|
|
||||||
|
protected function getHeraldFieldStandardConditions() {
|
||||||
|
return self::STANDARD_PHID_NULLABLE;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getHeraldFieldValueType($condition) {
|
||||||
|
switch ($condition) {
|
||||||
|
case HeraldAdapter::CONDITION_EXISTS:
|
||||||
|
case HeraldAdapter::CONDITION_NOT_EXISTS:
|
||||||
|
return HeraldAdapter::VALUE_NONE;
|
||||||
|
default:
|
||||||
|
return HeraldAdapter::VALUE_REPOSITORY;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,37 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
final class DifferentialRevisionRepositoryProjectsHeraldField
|
||||||
|
extends DifferentialRevisionHeraldField {
|
||||||
|
|
||||||
|
const FIELDCONST = 'differential.revision.repository.projects';
|
||||||
|
|
||||||
|
public function getHeraldFieldName() {
|
||||||
|
return pht('Repository projects');
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getHeraldFieldValue($object) {
|
||||||
|
$repository = $this->getAdapter()->loadRepository();
|
||||||
|
if (!$repository) {
|
||||||
|
return array();
|
||||||
|
}
|
||||||
|
|
||||||
|
return PhabricatorEdgeQuery::loadDestinationPHIDs(
|
||||||
|
$repository->getPHID(),
|
||||||
|
PhabricatorProjectObjectHasProjectEdgeType::EDGECONST);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected function getHeraldFieldStandardConditions() {
|
||||||
|
return self::STANDARD_LIST;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getHeraldFieldValueType($condition) {
|
||||||
|
switch ($condition) {
|
||||||
|
case HeraldAdapter::CONDITION_EXISTS:
|
||||||
|
case HeraldAdapter::CONDITION_NOT_EXISTS:
|
||||||
|
return HeraldAdapter::VALUE_NONE;
|
||||||
|
default:
|
||||||
|
return HeraldAdapter::VALUE_PROJECT;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,30 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
final class DifferentialRevisionReviewersHeraldField
|
||||||
|
extends DifferentialRevisionHeraldField {
|
||||||
|
|
||||||
|
const FIELDCONST = 'differential.revision.reviewers';
|
||||||
|
|
||||||
|
public function getHeraldFieldName() {
|
||||||
|
return pht('Reviewers');
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getHeraldFieldValue($object) {
|
||||||
|
return $this->getAdapter()->loadReviewers();
|
||||||
|
}
|
||||||
|
|
||||||
|
protected function getHeraldFieldStandardConditions() {
|
||||||
|
return self::STANDARD_LIST;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getHeraldFieldValueType($condition) {
|
||||||
|
switch ($condition) {
|
||||||
|
case HeraldAdapter::CONDITION_EXISTS:
|
||||||
|
case HeraldAdapter::CONDITION_NOT_EXISTS:
|
||||||
|
return HeraldAdapter::VALUE_NONE;
|
||||||
|
default:
|
||||||
|
return HeraldAdapter::VALUE_USER_OR_PROJECT;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,27 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
final class DifferentialRevisionSummaryHeraldField
|
||||||
|
extends DifferentialRevisionHeraldField {
|
||||||
|
|
||||||
|
const FIELDCONST = 'differential.revision.summary';
|
||||||
|
|
||||||
|
public function getHeraldFieldName() {
|
||||||
|
return pht('Revision summary');
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getHeraldFieldValue($object) {
|
||||||
|
// NOTE: For historical reasons, this field includes the test plan. We
|
||||||
|
// could maybe try to fix this some day, but it probably aligns reasonably
|
||||||
|
// well with user expectation without harming anything.
|
||||||
|
return $object->getSummary()."\n\n".$object->getTestPlan();
|
||||||
|
}
|
||||||
|
|
||||||
|
protected function getHeraldFieldStandardConditions() {
|
||||||
|
return self::STANDARD_TEXT;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getHeraldFieldValueType($condition) {
|
||||||
|
return HeraldAdapter::VALUE_TEXT;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,24 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
final class DifferentialRevisionTitleHeraldField
|
||||||
|
extends DifferentialRevisionHeraldField {
|
||||||
|
|
||||||
|
const FIELDCONST = 'differential.revision.title';
|
||||||
|
|
||||||
|
public function getHeraldFieldName() {
|
||||||
|
return pht('Revision title');
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getHeraldFieldValue($object) {
|
||||||
|
return $object->getTitle();
|
||||||
|
}
|
||||||
|
|
||||||
|
protected function getHeraldFieldStandardConditions() {
|
||||||
|
return self::STANDARD_TEXT;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getHeraldFieldValueType($condition) {
|
||||||
|
return HeraldAdapter::VALUE_TEXT;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -3,7 +3,6 @@
|
||||||
final class HeraldDifferentialRevisionAdapter
|
final class HeraldDifferentialRevisionAdapter
|
||||||
extends HeraldDifferentialAdapter {
|
extends HeraldDifferentialAdapter {
|
||||||
|
|
||||||
protected $diff;
|
|
||||||
protected $revision;
|
protected $revision;
|
||||||
|
|
||||||
protected $explicitReviewers;
|
protected $explicitReviewers;
|
||||||
|
@ -32,10 +31,6 @@ final class HeraldDifferentialRevisionAdapter
|
||||||
return $this->revision;
|
return $this->revision;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getDiff() {
|
|
||||||
return $this->diff;
|
|
||||||
}
|
|
||||||
|
|
||||||
public function getAdapterContentType() {
|
public function getAdapterContentType() {
|
||||||
return 'differential';
|
return 'differential';
|
||||||
}
|
}
|
||||||
|
@ -62,26 +57,6 @@ final class HeraldDifferentialRevisionAdapter
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getFields() {
|
|
||||||
return array_merge(
|
|
||||||
array(
|
|
||||||
self::FIELD_TITLE,
|
|
||||||
self::FIELD_BODY,
|
|
||||||
self::FIELD_AUTHOR,
|
|
||||||
self::FIELD_AUTHOR_PROJECTS,
|
|
||||||
self::FIELD_REVIEWERS,
|
|
||||||
self::FIELD_REPOSITORY,
|
|
||||||
self::FIELD_REPOSITORY_PROJECTS,
|
|
||||||
self::FIELD_DIFF_FILE,
|
|
||||||
self::FIELD_DIFF_CONTENT,
|
|
||||||
self::FIELD_DIFF_ADDED_CONTENT,
|
|
||||||
self::FIELD_DIFF_REMOVED_CONTENT,
|
|
||||||
self::FIELD_AFFECTED_PACKAGE,
|
|
||||||
self::FIELD_AFFECTED_PACKAGE_OWNER,
|
|
||||||
),
|
|
||||||
parent::getFields());
|
|
||||||
}
|
|
||||||
|
|
||||||
public function getRepetitionOptions() {
|
public function getRepetitionOptions() {
|
||||||
return array(
|
return array(
|
||||||
HeraldRepetitionPolicyConfig::EVERY,
|
HeraldRepetitionPolicyConfig::EVERY,
|
||||||
|
@ -103,7 +78,7 @@ final class HeraldDifferentialRevisionAdapter
|
||||||
->executeOne();
|
->executeOne();
|
||||||
|
|
||||||
$object->revision = $revision;
|
$object->revision = $revision;
|
||||||
$object->diff = $diff;
|
$object->setDiff($diff);
|
||||||
|
|
||||||
return $object;
|
return $object;
|
||||||
}
|
}
|
||||||
|
@ -129,17 +104,13 @@ final class HeraldDifferentialRevisionAdapter
|
||||||
return $this->buildPlans;
|
return $this->buildPlans;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getPHID() {
|
|
||||||
return $this->revision->getPHID();
|
|
||||||
}
|
|
||||||
|
|
||||||
public function getHeraldName() {
|
public function getHeraldName() {
|
||||||
return $this->revision->getTitle();
|
return $this->revision->getTitle();
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function loadChangesets() {
|
protected function loadChangesets() {
|
||||||
if ($this->changesets === null) {
|
if ($this->changesets === null) {
|
||||||
$this->changesets = $this->diff->loadChangesets();
|
$this->changesets = $this->getDiff()->loadChangesets();
|
||||||
}
|
}
|
||||||
return $this->changesets;
|
return $this->changesets;
|
||||||
}
|
}
|
||||||
|
@ -175,66 +146,15 @@ final class HeraldDifferentialRevisionAdapter
|
||||||
return $this->affectedPackages;
|
return $this->affectedPackages;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getHeraldField($field) {
|
public function loadReviewers() {
|
||||||
switch ($field) {
|
// TODO: This can probably go away as I believe it's just a performance
|
||||||
case self::FIELD_TITLE:
|
// optimization, just retaining it while modularizing fields to limit the
|
||||||
return $this->revision->getTitle();
|
// scope of that change.
|
||||||
break;
|
if (isset($this->explicitReviewers)) {
|
||||||
case self::FIELD_BODY:
|
return array_keys($this->explicitReviewers);
|
||||||
return $this->revision->getSummary()."\n".
|
} else {
|
||||||
$this->revision->getTestPlan();
|
return $this->revision->getReviewers();
|
||||||
break;
|
|
||||||
case self::FIELD_AUTHOR:
|
|
||||||
return $this->revision->getAuthorPHID();
|
|
||||||
break;
|
|
||||||
case self::FIELD_AUTHOR_PROJECTS:
|
|
||||||
$author_phid = $this->revision->getAuthorPHID();
|
|
||||||
if (!$author_phid) {
|
|
||||||
return array();
|
|
||||||
}
|
|
||||||
|
|
||||||
$projects = id(new PhabricatorProjectQuery())
|
|
||||||
->setViewer(PhabricatorUser::getOmnipotentUser())
|
|
||||||
->withMemberPHIDs(array($author_phid))
|
|
||||||
->execute();
|
|
||||||
|
|
||||||
return mpull($projects, 'getPHID');
|
|
||||||
case self::FIELD_DIFF_FILE:
|
|
||||||
return $this->loadAffectedPaths();
|
|
||||||
case self::FIELD_REVIEWERS:
|
|
||||||
if (isset($this->explicitReviewers)) {
|
|
||||||
return array_keys($this->explicitReviewers);
|
|
||||||
} else {
|
|
||||||
return $this->revision->getReviewers();
|
|
||||||
}
|
|
||||||
case self::FIELD_REPOSITORY:
|
|
||||||
$repository = $this->loadRepository();
|
|
||||||
if (!$repository) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
return $repository->getPHID();
|
|
||||||
case self::FIELD_REPOSITORY_PROJECTS:
|
|
||||||
$repository = $this->loadRepository();
|
|
||||||
if (!$repository) {
|
|
||||||
return array();
|
|
||||||
}
|
|
||||||
return $repository->getProjectPHIDs();
|
|
||||||
case self::FIELD_DIFF_CONTENT:
|
|
||||||
return $this->loadContentDictionary();
|
|
||||||
case self::FIELD_DIFF_ADDED_CONTENT:
|
|
||||||
return $this->loadAddedContentDictionary();
|
|
||||||
case self::FIELD_DIFF_REMOVED_CONTENT:
|
|
||||||
return $this->loadRemovedContentDictionary();
|
|
||||||
case self::FIELD_AFFECTED_PACKAGE:
|
|
||||||
$packages = $this->loadAffectedPackages();
|
|
||||||
return mpull($packages, 'getPHID');
|
|
||||||
case self::FIELD_AFFECTED_PACKAGE_OWNER:
|
|
||||||
$packages = $this->loadAffectedPackages();
|
|
||||||
return PhabricatorOwnersOwner::loadAffiliatedUserPHIDs(
|
|
||||||
mpull($packages, 'getID'));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return parent::getHeraldField($field);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getActions($rule_type) {
|
public function getActions($rule_type) {
|
|
@ -30,7 +30,7 @@ final class DiffusionCommitPackageOwnerHeraldField
|
||||||
case HeraldAdapter::CONDITION_NOT_EXISTS:
|
case HeraldAdapter::CONDITION_NOT_EXISTS:
|
||||||
return HeraldAdapter::VALUE_NONE;
|
return HeraldAdapter::VALUE_NONE;
|
||||||
default:
|
default:
|
||||||
return HeraldAdapter::VALUE_USER;
|
return HeraldAdapter::VALUE_USER_OR_PROJECT;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -6,7 +6,6 @@ abstract class HeraldAdapter extends Phobject {
|
||||||
const FIELD_BODY = 'body';
|
const FIELD_BODY = 'body';
|
||||||
const FIELD_AUTHOR = 'author';
|
const FIELD_AUTHOR = 'author';
|
||||||
const FIELD_REVIEWER = 'reviewer';
|
const FIELD_REVIEWER = 'reviewer';
|
||||||
const FIELD_REVIEWERS = 'reviewers';
|
|
||||||
const FIELD_COMMITTER = 'committer';
|
const FIELD_COMMITTER = 'committer';
|
||||||
const FIELD_DIFF_FILE = 'diff-file';
|
const FIELD_DIFF_FILE = 'diff-file';
|
||||||
const FIELD_DIFF_CONTENT = 'diff-content';
|
const FIELD_DIFF_CONTENT = 'diff-content';
|
||||||
|
@ -367,7 +366,6 @@ abstract class HeraldAdapter extends Phobject {
|
||||||
self::FIELD_AUTHOR => pht('Author'),
|
self::FIELD_AUTHOR => pht('Author'),
|
||||||
self::FIELD_COMMITTER => pht('Committer'),
|
self::FIELD_COMMITTER => pht('Committer'),
|
||||||
self::FIELD_REVIEWER => pht('Reviewer'),
|
self::FIELD_REVIEWER => pht('Reviewer'),
|
||||||
self::FIELD_REVIEWERS => pht('Reviewers'),
|
|
||||||
self::FIELD_DIFF_FILE => pht('Any changed filename'),
|
self::FIELD_DIFF_FILE => pht('Any changed filename'),
|
||||||
self::FIELD_DIFF_CONTENT => pht('Any changed file content'),
|
self::FIELD_DIFF_CONTENT => pht('Any changed file content'),
|
||||||
self::FIELD_DIFF_ADDED_CONTENT => pht('Any added file content'),
|
self::FIELD_DIFF_ADDED_CONTENT => pht('Any added file content'),
|
||||||
|
@ -459,7 +457,6 @@ abstract class HeraldAdapter extends Phobject {
|
||||||
self::CONDITION_EXISTS,
|
self::CONDITION_EXISTS,
|
||||||
self::CONDITION_NOT_EXISTS,
|
self::CONDITION_NOT_EXISTS,
|
||||||
);
|
);
|
||||||
case self::FIELD_REVIEWERS:
|
|
||||||
case self::FIELD_AUTHOR_PROJECTS:
|
case self::FIELD_AUTHOR_PROJECTS:
|
||||||
case self::FIELD_AFFECTED_PACKAGE:
|
case self::FIELD_AFFECTED_PACKAGE:
|
||||||
case self::FIELD_AFFECTED_PACKAGE_OWNER:
|
case self::FIELD_AFFECTED_PACKAGE_OWNER:
|
||||||
|
@ -922,8 +919,6 @@ abstract class HeraldAdapter extends Phobject {
|
||||||
case self::FIELD_PUSHER_PROJECTS:
|
case self::FIELD_PUSHER_PROJECTS:
|
||||||
case self::FIELD_REPOSITORY_PROJECTS:
|
case self::FIELD_REPOSITORY_PROJECTS:
|
||||||
return self::VALUE_PROJECT;
|
return self::VALUE_PROJECT;
|
||||||
case self::FIELD_REVIEWERS:
|
|
||||||
return self::VALUE_USER_OR_PROJECT;
|
|
||||||
default:
|
default:
|
||||||
return self::VALUE_USER;
|
return self::VALUE_USER;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue