Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F99651349
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
Sun, Jan 26, 00:00
Size
956 B
Mime Type
text/x-php
Expires
Tue, Jan 28, 00:00 (2 d)
Engine
blob
Format
Raw Data
Handle
23838246
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