Allow excluding paths from package
Summary: Resolves T2149.
Test Plan:
$ bin/storage upgrade
# /owners/ - saw +
# /owners/package/1/ - saw +
# /owners/edit/1/ - added exclude paths, saw correct e-mail
# /rPabc123 - included paths are still highlighted and excluded not
# /owners/view/search/?path=/included/ - found
# /owners/view/search/?path=/excluded/ - not found
# owners.query - path: /included/
# owners.query - path: /excluded/
# new unit test
PhabricatorOwnersPackage::loadAffectedPackages(
$repository,
array('/excluded/b.php'));
PhabricatorOwnersPackage::loadAffectedPackages(
$repository,
array('/included/a.php'));
Reviewers: epriestley
Reviewed By: epriestley
CC: aran, Korvin
Maniphest Tasks: T2149
Differential Revision: https://secure.phabricator.com/D4102
This commit is contained in:
@@ -47,6 +47,7 @@ final class PhabricatorOwnersEditController
|
||||
|
||||
$paths = $request->getArr('path');
|
||||
$repos = $request->getArr('repo');
|
||||
$excludes = $request->getArr('exclude');
|
||||
|
||||
$path_refs = array();
|
||||
for ($ii = 0; $ii < count($paths); $ii++) {
|
||||
@@ -56,6 +57,7 @@ final class PhabricatorOwnersEditController
|
||||
$path_refs[] = array(
|
||||
'repositoryPHID' => $repos[$ii],
|
||||
'path' => $paths[$ii],
|
||||
'excluded' => $excludes[$ii],
|
||||
);
|
||||
}
|
||||
|
||||
@@ -102,6 +104,7 @@ final class PhabricatorOwnersEditController
|
||||
$path_refs[] = array(
|
||||
'repositoryPHID' => $path->getRepositoryPHID(),
|
||||
'path' => $path->getPath(),
|
||||
'excluded' => $path->getExcluded(),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user