(file: PRFileDiff)
| 44 | } |
| 45 | |
| 46 | function buildChangeProperties(file: PRFileDiff): Record<string, unknown> { |
| 47 | const props: Record<string, unknown> = { |
| 48 | status: file.status, |
| 49 | additions: file.additions, |
| 50 | deletions: file.deletions, |
| 51 | path: file.path, |
| 52 | }; |
| 53 | if (file.patch) { |
| 54 | props.patch = truncatePatch(file.patch); |
| 55 | } |
| 56 | if (file.previous_path) { |
| 57 | props.previous_path = file.previous_path; |
| 58 | } |
| 59 | return props; |
| 60 | } |
| 61 | |
| 62 | export async function indexPRIntoGraph( |
| 63 | store: GraphStore, |
no test coverage detected