Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F92728778
ReleephDifferentialRevisionDetailRenderer.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
Sat, Nov 23, 05:07
Size
956 B
Mime Type
text/x-php
Expires
Mon, Nov 25, 05:07 (1 d, 20 h)
Engine
blob
Format
Raw Data
Handle
22498848
Attached To
rPH Phabricator
ReleephDifferentialRevisionDetailRenderer.php
View Options
<?php
final
class
ReleephDifferentialRevisionDetailRenderer
{
public
static
function
generateActionLink
(
DifferentialRevision
$revision
,
DifferentialDiff
$diff
)
{
$arc_project
=
$diff
->
loadArcanistProject
();
// 93us
if
(!
$arc_project
)
{
return
;
}
$releeph_projects
=
id
(
new
ReleephProject
())->
loadAllWhere
(
'arcanistProjectID = %d AND isActive = 1'
,
$arc_project
->
getID
());
if
(!
$releeph_projects
)
{
return
;
}
$releeph_branches
=
id
(
new
ReleephBranch
())->
loadAllWhere
(
'releephProjectID IN (%Ld) AND isActive = 1'
,
mpull
(
$releeph_projects
,
'getID'
));
if
(!
$releeph_branches
)
{
return
;
}
$uri
=
new
PhutilURI
(
'/releeph/request/differentialcreate/D'
.
$revision
->
getID
());
return
array
(
'name'
=>
'Releeph Request'
,
'sigil'
=>
'workflow'
,
'href'
=>
$uri
,
'icon'
=>
'fork'
,
);
}
}
Event Timeline
Log In to Comment