mirror of
https://github.com/graalvm/setup-graalvm.git
synced 2025-03-13 14:30:15 +08:00
fix mermaid syntax
This commit is contained in:
parent
aeef0e5848
commit
73c66f804d
21
dist/cleanup/index.js
generated
vendored
21
dist/cleanup/index.js
generated
vendored
@ -81867,11 +81867,11 @@ function generateReports() {
|
||||
if (areMetricHistoriesEnabled()) {
|
||||
const pushEvents = yield (0, utils_1.getPushEvents)(getBuildCountsForMetricHistory());
|
||||
// Prepare data
|
||||
// const timestamps = []
|
||||
const timestamps = [];
|
||||
const shas = [];
|
||||
// core.info("pushEvents: " + pushEvents[0].created_at)
|
||||
for (let i = 0; i < pushEvents.length; i++) {
|
||||
// timestamps.push(pushEvents[i].created_at)
|
||||
timestamps.push(pushEvents[i].created_at);
|
||||
shas.push(pushEvents[i].payload.commits[pushEvents[i].payload.commits.length - 1].sha);
|
||||
}
|
||||
const imageData = yield (0, utils_1.getImageData)(shas);
|
||||
@ -81880,8 +81880,8 @@ function generateReports() {
|
||||
core.summary.addRaw(mermaidDiagramm);
|
||||
yield core.summary.write();
|
||||
// Extract data for plotting
|
||||
// const commitDates = formatTimestamps(timestamps)
|
||||
// core.info(String(commitDates))
|
||||
const commitDates = (0, utils_1.formatTimestamps)(timestamps);
|
||||
core.info(JSON.stringify(commitDates));
|
||||
}
|
||||
if (arePRBaseComparisonEnabled()) {
|
||||
const prMetrics = JSON.parse(yield (0, utils_1.getPrBaseBranchMetrics)());
|
||||
@ -81969,11 +81969,6 @@ gantt
|
||||
<em>Report generated by <a href="https://github.com/marketplace/actions/github-action-for-graalvm" target="_blank">setup-graalvm</a>.</em>`;
|
||||
}
|
||||
function createHistoryDiagramm(shas, metricDataList) {
|
||||
core.info(JSON.stringify(metricDataList[0]));
|
||||
core.info(typeof (metricDataList[0]));
|
||||
core.info(metricDataList[0]);
|
||||
core.info(JSON.stringify(metricDataList[0].image_details));
|
||||
core.info(JSON.parse(metricDataList[0]).image_details.total_bytes);
|
||||
let mermaidDiagramm = `## GraalVM Native Image PR comparison
|
||||
|
||||
#### Image Details
|
||||
@ -81988,8 +81983,8 @@ gantt
|
||||
`;
|
||||
for (let i = 0; i < metricDataList.length; i++) {
|
||||
mermaidDiagramm = mermaidDiagramm + `
|
||||
section ${shas[i]}
|
||||
Total ${bytesToHuman(JSON.parse(metricDataList[i]).image_details.total_bytes)}: ${shas[i] === process.env.GITHUB_SHA ? 'active' : ''} 0, ${JSON.parse(metricDataList[i]).image_details.total_bytes}
|
||||
section ${shas[i].slice(0, 8)}...
|
||||
${bytesToHuman(JSON.parse(metricDataList[i]).image_details.total_bytes)}: ${shas[i] === process.env.GITHUB_SHA ? 'active, ' : ''} 0, ${JSON.parse(metricDataList[i]).image_details.total_bytes}
|
||||
|
||||
`;
|
||||
}
|
||||
@ -82611,8 +82606,8 @@ function getPushEvents(numberOfBuilds) {
|
||||
exports.getPushEvents = getPushEvents;
|
||||
function formatTimestamps(timestamps) {
|
||||
const formattedTimestamps = [];
|
||||
for (const date in timestamps) {
|
||||
let commitTime = luxon_1.DateTime.fromISO(date);
|
||||
for (let i = 0; i < timestamps.length; i++) {
|
||||
let commitTime = luxon_1.DateTime.fromISO(timestamps[i]);
|
||||
let commitTimeUtc = commitTime.setZone('UTC');
|
||||
let commitTimeLocal = commitTimeUtc.setZone('Europe/Berlin');
|
||||
let formatter = 'dd.MM.\'HH:mm';
|
||||
|
21
dist/main/index.js
generated
vendored
21
dist/main/index.js
generated
vendored
@ -81966,11 +81966,11 @@ function generateReports() {
|
||||
if (areMetricHistoriesEnabled()) {
|
||||
const pushEvents = yield (0, utils_1.getPushEvents)(getBuildCountsForMetricHistory());
|
||||
// Prepare data
|
||||
// const timestamps = []
|
||||
const timestamps = [];
|
||||
const shas = [];
|
||||
// core.info("pushEvents: " + pushEvents[0].created_at)
|
||||
for (let i = 0; i < pushEvents.length; i++) {
|
||||
// timestamps.push(pushEvents[i].created_at)
|
||||
timestamps.push(pushEvents[i].created_at);
|
||||
shas.push(pushEvents[i].payload.commits[pushEvents[i].payload.commits.length - 1].sha);
|
||||
}
|
||||
const imageData = yield (0, utils_1.getImageData)(shas);
|
||||
@ -81979,8 +81979,8 @@ function generateReports() {
|
||||
core.summary.addRaw(mermaidDiagramm);
|
||||
yield core.summary.write();
|
||||
// Extract data for plotting
|
||||
// const commitDates = formatTimestamps(timestamps)
|
||||
// core.info(String(commitDates))
|
||||
const commitDates = (0, utils_1.formatTimestamps)(timestamps);
|
||||
core.info(JSON.stringify(commitDates));
|
||||
}
|
||||
if (arePRBaseComparisonEnabled()) {
|
||||
const prMetrics = JSON.parse(yield (0, utils_1.getPrBaseBranchMetrics)());
|
||||
@ -82068,11 +82068,6 @@ gantt
|
||||
<em>Report generated by <a href="https://github.com/marketplace/actions/github-action-for-graalvm" target="_blank">setup-graalvm</a>.</em>`;
|
||||
}
|
||||
function createHistoryDiagramm(shas, metricDataList) {
|
||||
core.info(JSON.stringify(metricDataList[0]));
|
||||
core.info(typeof (metricDataList[0]));
|
||||
core.info(metricDataList[0]);
|
||||
core.info(JSON.stringify(metricDataList[0].image_details));
|
||||
core.info(JSON.parse(metricDataList[0]).image_details.total_bytes);
|
||||
let mermaidDiagramm = `## GraalVM Native Image PR comparison
|
||||
|
||||
#### Image Details
|
||||
@ -82087,8 +82082,8 @@ gantt
|
||||
`;
|
||||
for (let i = 0; i < metricDataList.length; i++) {
|
||||
mermaidDiagramm = mermaidDiagramm + `
|
||||
section ${shas[i]}
|
||||
Total ${bytesToHuman(JSON.parse(metricDataList[i]).image_details.total_bytes)}: ${shas[i] === process.env.GITHUB_SHA ? 'active' : ''} 0, ${JSON.parse(metricDataList[i]).image_details.total_bytes}
|
||||
section ${shas[i].slice(0, 8)}...
|
||||
${bytesToHuman(JSON.parse(metricDataList[i]).image_details.total_bytes)}: ${shas[i] === process.env.GITHUB_SHA ? 'active, ' : ''} 0, ${JSON.parse(metricDataList[i]).image_details.total_bytes}
|
||||
|
||||
`;
|
||||
}
|
||||
@ -83687,8 +83682,8 @@ function getPushEvents(numberOfBuilds) {
|
||||
exports.getPushEvents = getPushEvents;
|
||||
function formatTimestamps(timestamps) {
|
||||
const formattedTimestamps = [];
|
||||
for (const date in timestamps) {
|
||||
let commitTime = luxon_1.DateTime.fromISO(date);
|
||||
for (let i = 0; i < timestamps.length; i++) {
|
||||
let commitTime = luxon_1.DateTime.fromISO(timestamps[i]);
|
||||
let commitTimeUtc = commitTime.setZone('UTC');
|
||||
let commitTimeLocal = commitTimeUtc.setZone('Europe/Berlin');
|
||||
let formatter = 'dd.MM.\'HH:mm';
|
||||
|
@ -152,11 +152,11 @@ export async function generateReports(): Promise<void> {
|
||||
if (areMetricHistoriesEnabled()) {
|
||||
const pushEvents = await getPushEvents(getBuildCountsForMetricHistory())
|
||||
// Prepare data
|
||||
// const timestamps = []
|
||||
const timestamps = []
|
||||
const shas = []
|
||||
// core.info("pushEvents: " + pushEvents[0].created_at)
|
||||
for (let i=0; i < pushEvents.length; i++) {
|
||||
// timestamps.push(pushEvents[i].created_at)
|
||||
timestamps.push(pushEvents[i].created_at)
|
||||
shas.push(pushEvents[i].payload.commits[pushEvents[i].payload.commits.length - 1].sha)
|
||||
|
||||
}
|
||||
@ -167,8 +167,8 @@ export async function generateReports(): Promise<void> {
|
||||
await core.summary.write()
|
||||
|
||||
// Extract data for plotting
|
||||
// const commitDates = formatTimestamps(timestamps)
|
||||
// core.info(String(commitDates))
|
||||
const commitDates = formatTimestamps(timestamps)
|
||||
core.info(JSON.stringify(commitDates))
|
||||
|
||||
|
||||
}
|
||||
@ -272,13 +272,6 @@ gantt
|
||||
}
|
||||
|
||||
function createHistoryDiagramm(shas: String[], metricDataList: any[]): string {
|
||||
|
||||
core.info(JSON.stringify(metricDataList[0]))
|
||||
core.info(typeof(metricDataList[0]))
|
||||
core.info(metricDataList[0])
|
||||
core.info(JSON.stringify(metricDataList[0].image_details))
|
||||
core.info(JSON.parse(metricDataList[0]).image_details.total_bytes)
|
||||
|
||||
let mermaidDiagramm = `## GraalVM Native Image PR comparison
|
||||
|
||||
#### Image Details
|
||||
@ -293,8 +286,8 @@ gantt
|
||||
`
|
||||
for (let i=0; i<metricDataList.length; i++) {
|
||||
mermaidDiagramm = mermaidDiagramm + `
|
||||
section ${shas[i]}
|
||||
Total ${bytesToHuman(JSON.parse(metricDataList[i]).image_details.total_bytes)}: ${shas[i] === process.env.GITHUB_SHA? 'active': ''} 0, ${JSON.parse(metricDataList[i]).image_details.total_bytes}
|
||||
section ${shas[i].slice(0, 8)}...
|
||||
${bytesToHuman(JSON.parse(metricDataList[i]).image_details.total_bytes)}: ${shas[i] === process.env.GITHUB_SHA? 'active, ': ''} 0, ${JSON.parse(metricDataList[i]).image_details.total_bytes}
|
||||
|
||||
`
|
||||
}
|
||||
|
@ -390,8 +390,8 @@ export async function getPushEvents(numberOfBuilds: number): Promise<any[]> {
|
||||
|
||||
export function formatTimestamps(timestamps: string[]) {
|
||||
const formattedTimestamps = []
|
||||
for (const date in timestamps) {
|
||||
let commitTime = DateTime.fromISO(date);
|
||||
for (let i=0; i<timestamps.length; i++) {
|
||||
let commitTime = DateTime.fromISO(timestamps[i]);
|
||||
let commitTimeUtc = commitTime.setZone('UTC');
|
||||
let commitTimeLocal = commitTimeUtc.setZone('Europe/Berlin');
|
||||
let formatter = 'dd.MM.\'HH:mm';
|
||||
|
Loading…
x
Reference in New Issue
Block a user