From ab0f8456e34fb50f511cff33a54c5e448cba39b4 Mon Sep 17 00:00:00 2001 From: Jochen Delabie Date: Wed, 2 Sep 2026 13:18:41 +0200 Subject: [PATCH] cli: log when the server registered a GitHub check for a Maestro run (TB-377) The run endpoint now returns ci_check { provider, repo, commit_sha } when the CI metadata matched an installed TestingBot GitHub App. Surface it so users see the PR status will update, and know why it did not when the line is absent. --- src/providers/maestro.ts | 8 ++++++++ tests/providers/maestro.test.ts | 22 ++++++++++++++++++++++ 2 files changed, 30 insertions(+) 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;