Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F2890346
PhabricatorCommitBranchesField.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
967 B
Referenced Files
None
Subscribers
None
PhabricatorCommitBranchesField.php
View Options
<?php
final
class
PhabricatorCommitBranchesField
extends
PhabricatorCommitCustomField
{
public
function
getFieldKey
(
)
{
return
'diffusion:branches'
;
}
public
function
shouldAppearInApplicationTransactions
(
)
{
return
true
;
}
public
function
buildApplicationTransactionMailBody
(
PhabricatorApplicationTransaction
$xaction
,
PhabricatorMetaMTAMailBody
$body
)
{
$params
=
array
(
'contains'
=>
$this
->
getObject
(
)
->
getCommitIdentifier
(
)
,
'callsign'
=>
$this
->
getObject
(
)
->
getRepository
(
)
->
getCallsign
(
)
,
)
;
$branches_raw
=
id
(
new
ConduitCall
(
'diffusion.branchquery'
,
$params
)
)
->
setUser
(
$this
->
getViewer
(
)
)
->
execute
(
)
;
$branches
=
DiffusionRepositoryRef
::
loadAllFromDictionaries
(
$branches_raw
)
;
if
(
!
$branches
)
{
return
;
}
$branch_names
=
mpull
(
$branches
,
'getShortName'
)
;
sort
(
$branch_names
)
;
$body
->
addTextSection
(
pht
(
'BRANCHES'
)
,
implode
(
', '
,
$branch_names
)
)
;
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Sun, Jan 19, 13:25 (3 w, 3 d ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1125044
Default Alt Text
PhabricatorCommitBranchesField.php (967 B)
Attached To
Mode
rP Phorge
Attached
Detach File
Event Timeline
Log In to Comment