make pr metrics write to pr request

This commit is contained in:
jpaul 2023-11-14 15:55:54 +01:00
parent f30640c2cc
commit b035e809a3
3 changed files with 11 additions and 9 deletions

6
dist/cleanup/index.js generated vendored
View File

@ -74453,8 +74453,8 @@ function generateReports() {
const buildOutput = JSON.parse(fs.readFileSync(BUILD_OUTPUT_JSON_PATH, 'utf8'));
const treeSha = yield (0, utils_1.createTree)(JSON.stringify(buildOutput));
yield (0, utils_1.createRef)(treeSha);
const prMetrics = yield (0, utils_1.getPrBaseBranchMetrics)();
const prBaseReport = createReport(buildOutput);
const prMetrics = JSON.parse(yield (0, utils_1.getPrBaseBranchMetrics)());
const prBaseReport = createReport(prMetrics);
const report = createReport(buildOutput);
if (areJobReportsEnabled()) {
core.summary.addRaw(report);
@ -74462,7 +74462,7 @@ function generateReports() {
}
if (arePRReportsEnabled()) {
(0, utils_1.createPRComment)(report);
(0, utils_1.createPRComment)(report + buildOutput);
(0, utils_1.createPRComment)(prBaseReport);
}
}
});

6
dist/main/index.js generated vendored
View File

@ -74552,8 +74552,8 @@ function generateReports() {
const buildOutput = JSON.parse(fs.readFileSync(BUILD_OUTPUT_JSON_PATH, 'utf8'));
const treeSha = yield (0, utils_1.createTree)(JSON.stringify(buildOutput));
yield (0, utils_1.createRef)(treeSha);
const prMetrics = yield (0, utils_1.getPrBaseBranchMetrics)();
const prBaseReport = createReport(buildOutput);
const prMetrics = JSON.parse(yield (0, utils_1.getPrBaseBranchMetrics)());
const prBaseReport = createReport(prMetrics);
const report = createReport(buildOutput);
if (areJobReportsEnabled()) {
core.summary.addRaw(report);
@ -74561,7 +74561,7 @@ function generateReports() {
}
if (arePRReportsEnabled()) {
(0, utils_1.createPRComment)(report);
(0, utils_1.createPRComment)(report + buildOutput);
(0, utils_1.createPRComment)(prBaseReport);
}
}
});

View File

@ -136,8 +136,10 @@ export async function generateReports(): Promise<void> {
const treeSha = await createTree(JSON.stringify(buildOutput))
await createRef(treeSha)
const prMetrics = await getPrBaseBranchMetrics()
const prBaseReport = createReport(buildOutput)
const prMetrics: BuildOutput = JSON.parse(
await getPrBaseBranchMetrics()
)
const prBaseReport = createReport(prMetrics)
const report = createReport(buildOutput)
if (areJobReportsEnabled()) {
@ -146,7 +148,7 @@ export async function generateReports(): Promise<void> {
}
if (arePRReportsEnabled()) {
createPRComment(report)
createPRComment(report + buildOutput)
createPRComment(prBaseReport)
}
}
}