diff --git a/src/providers/maestro.ts b/src/providers/maestro.ts index b95d87d..4636ef9 100644 --- a/src/providers/maestro.ts +++ b/src/providers/maestro.ts @@ -2139,6 +2139,14 @@ export default class Maestro extends BaseProvider { this.updateKey = result.update_key; } + // The server registers a GitHub check when the run carries repo + commit + // metadata and the TestingBot GitHub App is installed for that repo. + if (result.ci_check?.repo && !this.options.quiet) { + logger.info( + `GitHub check registered for ${result.ci_check.repo}@${String(result.ci_check.commit_sha).slice(0, 7)}; the PR status updates when the run completes.`, + ); + } + if (result.success === false) { // API returns errors as an array const errorMessage = diff --git a/tests/providers/maestro.test.ts b/tests/providers/maestro.test.ts index 3cdf121..ee032a2 100644 --- a/tests/providers/maestro.test.ts +++ b/tests/providers/maestro.test.ts @@ -814,6 +814,28 @@ describe('Maestro', () => { ); }); + it('logs when the server registered a GitHub check for the run', async () => { + maestro['appId'] = 1234; + axios.post = jest.fn().mockResolvedValueOnce({ + data: { + success: true, + runs: [], + ci_check: { + provider: 'github', + repo: 'acme/app', + commit_sha: 'abcdef0123456789', + }, + }, + headers: {}, + }); + const logSpy = jest.spyOn(logger, 'info').mockImplementation(() => {}); + await maestro['runTests'](); + expect(logSpy).toHaveBeenCalledWith( + expect.stringContaining('GitHub check registered for acme/app@abcdef0'), + ); + logSpy.mockRestore(); + }); + it('should not include maestroOptions when none are set', async () => { maestro['appId'] = 1234;