Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F92743559
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
Sat, Nov 23, 08:41
Size
795 B
Mime Type
text/x-php
Expires
Mon, Nov 25, 08:41 (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