Startrekzky commented on issue #3498:
URL: 
https://github.com/apache/incubator-devlake/issues/3498#issuecomment-1288915361

   > @hezyin @Startrekzky Going by [this 
doc](https://devlake.apache.org/docs/Plugins/webhook#incident--issue), are the 
required fields in that table the minimum we'll need to create a domain Issue 
object from PagerDuty's data?
   
   Yes, but we want to collect as much information as possible. Below is the 
mapping logic between the schema of DevLake issues and PagerDuty incidents in 
Singer.
   
   | [DevLake 
issues](https://devlake.apache.org/docs/DataModels/DevLakeDomainLayerSchema#issues)
 | [PagerDuty 
incidents](https://github.com/goodeggs/tap-pagerduty/blob/master/tap_pagerduty/schemas/incidents.json)
 | 
   | ------------------------- | ----------------------------- |
   | board_key | service_id, make sure a board is created in table.boards. A 
board is a collection of issues, if there's no `project` or `board` entity in 
PagerDuty, then service might be a good choice to be abstracted to a `DevLake 
board` here. |
   | url               | html_url |
   | issue_key   | incident_number |
   | title  | title |
   | description  | summary |
   | type  | a constant 'INCIDENT' |
   | status  | PagerDuty incident URL |
   | original_status  | status. Must be one of `TODO` `DONE` `IN_PROGRESS` |
   | created_date  | created_at |
   | resolution_date  | I didn't find a field called `duration` in Singer's 
schema. Maybe we can transform it from field `last_status_change_at` of an 
incident whose status is DONE |
   | priority | priority.properties.id or another key in priority.properties  |
   | lead_time_minutes  | an incident's resolution_date - created_ at, convert 
to `minutes` |
   | assignee_id  | assignments.items.assignee.id |
   | assignee_name  | I didn't see an assignment name here, but please convert 
it if it exists |
   
   
   Please note that this mapping logic is based on the names of PagerDuty's 
incident schema. You can modify it if the real data doesn't look like this.
   
   Also, please note that entity `boards` and `accounts` also need to be 
implemented if `service name` and `incident assignee` are wanted here.
   
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to