| 49 | getGitHubRepositoryReference, |
| 50 | isGitHubRepositoryLinked, |
| 51 | } from './github'; |
| 52 | |
| 53 | const githubPlatform = createGitHubBotPlatform({ |
| 54 | getInstallationId: jest.fn(), |
| 55 | }); |
| 56 | |
| 57 | function createMessage(params: { id: string; text: string; author?: string }): Message { |
| 58 | return { |
| 59 | id: params.id, |
| 60 | threadId: 'github:Kilo-Org/on-call:issue:37', |
| 61 | text: params.text, |
| 62 | formatted: { type: 'root', children: [] }, |
| 63 | raw: {}, |
| 64 | author: { |
| 65 | fullName: params.author ?? 'RSO', |
| 66 | isBot: false, |
| 67 | isMe: false, |
| 68 | userId: '123', |
| 69 | userName: params.author ?? 'RSO', |
| 70 | }, |
| 71 | metadata: { |
| 72 | dateSent: new Date('2026-05-05T07:32:52Z'), |
| 73 | edited: false, |
| 74 | }, |
| 75 | attachments: [], |
| 76 | links: [], |
| 77 | subject: Promise.resolve(null), |
| 78 | toJSON: () => { |