Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F78650059
PhabricatorRepositoryManagementDeleteWorkflow.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Thu, Aug 22, 04:36
Size
1 KB
Mime Type
text/x-php
Expires
Sat, Aug 24, 04:36 (2 d)
Engine
blob
Format
Raw Data
Handle
20080886
Attached To
rPH Phabricator
PhabricatorRepositoryManagementDeleteWorkflow.php
View Options
<?php
final
class
PhabricatorRepositoryManagementDeleteWorkflow
extends
PhabricatorRepositoryManagementWorkflow
{
public
function
didConstruct
()
{
$this
->
setName
(
'delete'
)
->
setExamples
(
'**delete** __repository__ ...'
)
->
setSynopsis
(
'Delete __repository__, named by callsign or PHID.'
)
->
setArguments
(
array
(
array
(
'name'
=>
'verbose'
,
'help'
=>
'Show additional debugging information.'
,
),
array
(
'name'
=>
'repos'
,
'wildcard'
=>
true
,
),
));
}
public
function
execute
(
PhutilArgumentParser
$args
)
{
$names
=
$args
->
getArg
(
'repos'
);
$repos
=
PhabricatorRepository
::
loadAllByPHIDOrCallsign
(
$names
);
if
(!
$repos
)
{
throw
new
PhutilArgumentUsageException
(
"Specify one or more repositories to delete, by callsign or PHID."
);
}
$console
=
PhutilConsole
::
getConsole
();
foreach
(
$repos
as
$repo
)
{
$console
->
writeOut
(
"Deleting '%s'...
\n
"
,
$repo
->
getCallsign
());
$repo
->
delete
();
}
$console
->
writeOut
(
"Done.
\n
"
);
return
0
;
}
}
Event Timeline
Log In to Comment