Provide a more flexible script for administrative management of audits

Summary: Fixes T3679. This comes up every so often and the old script is extremely broad (nuke everything in a repository). Provide a more surgical tool.

Test Plan: Ran a bunch of variations of the script and they all seemed to work OK.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran, staticshock

Maniphest Tasks: T3679

Differential Revision: https://secure.phabricator.com/D6678
This commit is contained in:
epriestley
2013-08-05 10:35:01 -07:00
parent 02ccca4bbd
commit 86989c9f98
7 changed files with 342 additions and 81 deletions

22
scripts/setup/manage_audit.php Executable file
View File

@@ -0,0 +1,22 @@
#!/usr/bin/env php
<?php
$root = dirname(dirname(dirname(__FILE__)));
require_once $root.'/scripts/__init_script__.php';
$args = new PhutilArgumentParser($argv);
$args->setTagline('manage audits');
$args->setSynopsis(<<<EOSYNOPSIS
**audit** __command__ [__options__]
Manage Phabricator audits.
EOSYNOPSIS
);
$args->parseStandardArguments();
$workflows = array(
new PhabricatorAuditManagementDeleteWorkflow(),
new PhutilHelpArgumentWorkflow(),
);
$args->parseWorkflows($workflows);