Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F96618637
PhabricatorRepositoryAutocloseOnlyTransaction.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, Dec 29, 00:43
Size
1 KB
Mime Type
text/x-php
Expires
Tue, Dec 31, 00:43 (2 d)
Engine
blob
Format
Raw Data
Handle
23200751
Attached To
rPH Phabricator
PhabricatorRepositoryAutocloseOnlyTransaction.php
View Options
<?php
final
class
PhabricatorRepositoryAutocloseOnlyTransaction
extends
PhabricatorRepositoryTransactionType
{
const
TRANSACTIONTYPE
=
'repo:autoclose-only'
;
public
function
generateOldValue
(
$object
)
{
return
array_keys
(
$object
->
getDetail
(
'close-commits-filter'
,
array
()));
}
public
function
applyInternalEffects
(
$object
,
$value
)
{
$object
->
setDetail
(
'close-commits-filter'
,
array_fill_keys
(
$value
,
true
));
}
public
function
getTitle
()
{
$old
=
$this
->
getOldValue
();
$new
=
$this
->
getNewValue
();
if
(!
$new
)
{
return
pht
(
'%s set this repository to autoclose on all branches.'
,
$this
->
renderAuthor
());
}
else
if
(!
$old
)
{
return
pht
(
'%s set this repository to autoclose on branches: %s.'
,
$this
->
renderAuthor
(),
$this
->
renderValue
(
implode
(
', '
,
$new
)));
}
else
{
return
pht
(
'%s changed autoclose branches from %s to %s.'
,
$this
->
renderAuthor
(),
$this
->
renderValue
(
implode
(
', '
,
$old
)),
$this
->
renderValue
(
implode
(
', '
,
$new
)));
}
}
public
function
validateTransactions
(
$object
,
array
$xactions
)
{
return
$this
->
validateRefList
(
$object
,
$xactions
);
}
}
Event Timeline
Log In to Comment