Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F93068734
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
Mon, Nov 25, 23:24
Size
1 KB
Mime Type
text/x-php
Expires
Wed, Nov 27, 23:24 (1 d, 23 h)
Engine
blob
Format
Raw Data
Handle
22567484
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