Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F99370804
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
Thu, Jan 23, 22:54
Size
817 B
Mime Type
text/x-php
Expires
Sat, Jan 25, 22:54 (2 d)
Engine
blob
Format
Raw Data
Handle
23787911
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
()
->
setStatus
(
NuanceItem
::
STATUS_IMPORTING
)
->
setSourcePHID
(
$source
->
getPHID
())
->
setItemType
(
NuanceGitHubEventItemType
::
ITEMTYPE
)
->
setItemKey
(
$item_key
)
->
setItemContainerKey
(
$container_key
)
->
setItemProperty
(
'api.type'
,
'issue'
)
->
setItemProperty
(
'api.raw'
,
$record
);
}
}
Event Timeline
Log In to Comment