(changes: ChangeSet)
| 60 | }) |
| 61 | |
| 62 | async function applyChanges(changes: ChangeSet) { |
| 63 | const { issues, comments } = changes |
| 64 | await sql.begin(async (sql) => { |
| 65 | for (const issue of issues) { |
| 66 | await applyTableChange(`issue`, issue, sql) |
| 67 | } |
| 68 | for (const comment of comments) { |
| 69 | await applyTableChange(`comment`, comment, sql) |
| 70 | } |
| 71 | }) |
| 72 | } |
| 73 | |
| 74 | async function applyTableChange( |
| 75 | tableName: `issue` | `comment`, |
no test coverage detected