Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F80502378
PhabricatorAuditSynchronizeManagementWorkflow.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
Sun, Sep 1, 02:17
Size
1 KB
Mime Type
text/x-php
Expires
Tue, Sep 3, 02:17 (1 d, 23 h)
Engine
blob
Format
Raw Data
Handle
20383574
Attached To
rPH Phabricator
PhabricatorAuditSynchronizeManagementWorkflow.php
View Options
<?php
final
class
PhabricatorAuditSynchronizeManagementWorkflow
extends
PhabricatorAuditManagementWorkflow
{
protected
function
didConstruct
()
{
$this
->
setName
(
'synchronize'
)
->
setExamples
(
"**synchronize** __repository__ ...
\n
"
.
"**synchronize** __commit__ ...
\n
"
.
"**synchronize** --all"
)
->
setSynopsis
(
pht
(
'Update commits to make their summary audit state reflect the '
.
'state of their actual audit requests. This can fix inconsistencies '
.
'in database state if audit requests have been mangled '
.
'accidentally (or on purpose).'
))
->
setArguments
(
array_merge
(
$this
->
getCommitConstraintArguments
(),
array
()));
}
public
function
execute
(
PhutilArgumentParser
$args
)
{
$viewer
=
$this
->
getViewer
();
$objects
=
$this
->
loadCommitsWithConstraints
(
$args
);
foreach
(
$objects
as
$object
)
{
$commits
=
$this
->
loadCommitsForConstraintObject
(
$object
);
foreach
(
$commits
as
$commit
)
{
$this
->
synchronizeCommitAuditState
(
$commit
->
getPHID
());
}
}
}
}
Event Timeline
Log In to Comment