Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F107793618
ConduitAPI_diffusion_stablecommitnamequery_Method.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
Thu, Apr 10, 20:30
Size
889 B
Mime Type
text/x-php
Expires
Sat, Apr 12, 20:30 (2 d)
Engine
blob
Format
Raw Data
Handle
25443579
Attached To
rPH Phabricator
ConduitAPI_diffusion_stablecommitnamequery_Method.php
View Options
<?php
/**
* @group conduit
*/
final
class
ConduitAPI_diffusion_stablecommitnamequery_Method
extends
ConduitAPI_diffusion_abstractquery_Method
{
public
function
__construct
()
{
$this
->
setShouldCreateDiffusionRequest
(
false
);
}
public
function
getMethodDescription
()
{
return
'Identifies the latest commit in a repository. Repositories with '
.
'branch support must specify which branch to look at.'
;
}
public
function
defineReturnType
()
{
return
'string'
;
}
protected
function
defineCustomParamTypes
()
{
return
array
(
'branch'
=>
'required string'
,
);
}
protected
function
getResult
(
ConduitAPIRequest
$request
)
{
$repository
=
$this
->
getRepository
(
$request
);
$query
=
DiffusionStableCommitNameQuery
::
newFromRepository
(
$repository
);
$query
->
setBranch
(
$request
->
getValue
(
'branch'
));
return
$query
->
load
();
}
}
Event Timeline
Log In to Comment