Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F2891730
NuanceGitHubIssuesImportCursor.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Award Token
Flag For Later
Advanced/Developer...
View Handle
View Hovercard
Size
795 B
Referenced Files
None
Subscribers
None
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
)
;
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Sun, Jan 19, 15:40 (3 w, 8 h ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1126090
Default Alt Text
NuanceGitHubIssuesImportCursor.php (795 B)
Attached To
Mode
rP Phorge
Attached
Detach File
Event Timeline
Log In to Comment