Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F92963331
NuanceGitHubIssuesImportCursor.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
Mon, Nov 25, 04:51
Size
795 B
Mime Type
text/x-php
Expires
Wed, Nov 27, 04:51 (2 d)
Engine
blob
Format
Raw Data
Handle
22503221
Attached To
rPH Phabricator
NuanceGitHubIssuesImportCursor.php
View Options
<?php
final
class
NuanceGitHubIssuesImportCursor
extends
NuanceGitHubImportCursor
{
const
CURSORTYPE
=
'github.issues'
;
protected
function
getGitHubAPIEndpointURI
(
$user
,
$repository
)
{
return
"/repos/{$user}/{$repository}/issues/events"
;
}
protected
function
newNuanceItemFromGitHubRecord
(
array
$record
)
{
$source
=
$this
->
getSource
();
$id
=
$record
[
'id'
];
$item_key
=
"github.issueevent.{$id}"
;
$container_key
=
null
;
return
NuanceItem
::
initializeNewItem
(
NuanceGitHubEventItemType
::
ITEMTYPE
)
->
setStatus
(
NuanceItem
::
STATUS_IMPORTING
)
->
setSourcePHID
(
$source
->
getPHID
())
->
setItemKey
(
$item_key
)
->
setItemContainerKey
(
$container_key
)
->
setItemProperty
(
'api.type'
,
'issue'
)
->
setItemProperty
(
'api.raw'
,
$record
);
}
}
Event Timeline
Log In to Comment