Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F2895727
PhabricatorRepositoryPermanentRefsTransaction.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Award Token
Flag For Later
Advanced/Developer...
View Handle
View Hovercard
Size
1 KB
Referenced Files
None
Subscribers
None
PhabricatorRepositoryPermanentRefsTransaction.php
View Options
<?php
final
class
PhabricatorRepositoryPermanentRefsTransaction
extends
PhabricatorRepositoryTransactionType
{
const
TRANSACTIONTYPE
=
'repo:autoclose-only'
;
public
function
generateOldValue
(
$object
)
{
return
$object
->
getPermanentRefRules
(
)
;
}
public
function
applyInternalEffects
(
$object
,
$value
)
{
$object
->
setPermanentRefRules
(
$value
)
;
}
public
function
getTitle
(
)
{
$old
=
$this
->
getOldValue
(
)
;
$new
=
$this
->
getNewValue
(
)
;
if
(
!
$new
)
{
return
pht
(
'%s marked all branches in this repository as permanent.'
,
$this
->
renderAuthor
(
)
)
;
}
else
if
(
!
$old
)
{
return
pht
(
'%s set the permanent refs for this repository to: %s.'
,
$this
->
renderAuthor
(
)
,
$this
->
renderValue
(
implode
(
', '
,
$new
)
)
)
;
}
else
{
return
pht
(
'%s changed permanent refs for this repository 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
)
;
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Jan 19 2025, 21:56 (6 w, 2 d ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1129159
Default Alt Text
PhabricatorRepositoryPermanentRefsTransaction.php (1 KB)
Attached To
Mode
rP Phorge
Attached
Detach File
Event Timeline
Log In to Comment