Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F543355
DiffusionLookSoonConduitAPIMethod.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
DiffusionLookSoonConduitAPIMethod.php
View Options
<?php
final
class
DiffusionLookSoonConduitAPIMethod
extends
DiffusionConduitAPIMethod
{
public
function
getAPIMethodName
()
{
return
'diffusion.looksoon'
;
}
public
function
getMethodStatus
()
{
return
self
::
METHOD_STATUS_UNSTABLE
;
}
public
function
getMethodDescription
()
{
return
pht
(
'Advises this server to look for new commits in a repository as soon '
.
'as possible. This advice is most useful if you have just pushed new '
.
'commits to that repository.'
);
}
protected
function
defineReturnType
()
{
return
'void'
;
}
protected
function
defineParamTypes
()
{
return
array
(
'callsigns'
=>
'optional list<string> (deprecated)'
,
'repositories'
=>
'optional list<string>'
,
'urgency'
=>
'optional string'
,
);
}
protected
function
execute
(
ConduitAPIRequest
$request
)
{
// NOTE: The "urgency" parameter does nothing, it is just a hilarious joke
// which exemplifies the boundless clever wit of this project.
$identifiers
=
$request
->
getValue
(
'repositories'
);
if
(!
$identifiers
)
{
$identifiers
=
$request
->
getValue
(
'callsigns'
);
}
if
(!
$identifiers
)
{
return
null
;
}
$repositories
=
id
(
new
PhabricatorRepositoryQuery
())
->
setViewer
(
$request
->
getUser
())
->
withIdentifiers
(
$identifiers
)
->
execute
();
foreach
(
$repositories
as
$repository
)
{
$repository
->
writeStatusMessage
(
PhabricatorRepositoryStatusMessage
::
TYPE_NEEDS_UPDATE
,
PhabricatorRepositoryStatusMessage
::
CODE_OKAY
);
}
return
null
;
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Mon, May 12, 11:13 AM (1 d, 21 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
119482
Default Alt Text
DiffusionLookSoonConduitAPIMethod.php (1 KB)
Attached To
Mode
rP Phorge
Attached
Detach File
Event Timeline
Log In to Comment