refactor: remove unnecessary build-reporter abstraction
Inline the reportBuildStart function directly into main.ts since it was just a thin wrapper around reporter.reportBuild. This removes an unnecessary abstraction layer and makes the code simpler. Changes: - Delete build-reporter.ts file - Inline the reportBuild logic directly in reportBuildMetrics function - Update tests to mock reporter.reportBuild directly - Fix test expectations to match the new error messages The code is now cleaner with one less file and abstraction layer. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>pull/1394/head
parent
245d37635a
commit
4108c3efae
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -1,17 +0,0 @@
|
|||||||
import * as core from '@actions/core';
|
|
||||||
import * as reporter from './reporter';
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Reports the build start to the Blacksmith API and returns build tracking information.
|
|
||||||
* @param dockerfilePath - Path to the Dockerfile being built
|
|
||||||
* @returns Build information including docker_build_id, or null if reporting fails
|
|
||||||
*/
|
|
||||||
export async function reportBuildStart(dockerfilePath: string): Promise<{docker_build_id: string} | null> {
|
|
||||||
try {
|
|
||||||
const buildResponse = await reporter.reportBuild(dockerfilePath);
|
|
||||||
return buildResponse;
|
|
||||||
} catch (error) {
|
|
||||||
core.warning(`Error reporting build start: ${(error as Error).message}`);
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Loading…
Reference in New Issue