import { processSpecmaticData, processSpecmaticCentralRepoReport } from './specmatic.js';
import { GithubBuildReportModel } from './GithubBuildReportModel.js';
export const saveGithubBuildReport = (report) => GithubBuildReportModel.updateOne({
    repo: report.repo,
    branch: report.branch,
    buildId: report.buildId,
}, {
    $set: {
        repoId: report.repoId,
        repoUrl: report.repoUrl,
        branchName: report.branchName,
        buildDefinitionId: report.buildDefinitionId,
        ...processSpecmaticData(report),
        ...processSpecmaticCentralRepoReport(report),
    },
}, { upsert: true });
