Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F108050430
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
Sun, Apr 13, 15:36
Size
889 B
Mime Type
text/x-php
Expires
Tue, Apr 15, 15:36 (2 d)
Engine
blob
Format
Raw Data
Handle
25516698
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