mirror of
https://github.com/graalvm/setup-graalvm.git
synced 2025-07-05 01:03:13 +08:00
adjust timestamp to iso time
This commit is contained in:
parent
6e749ba39e
commit
a9b5d04bda
9
dist/cleanup/index.js
generated
vendored
9
dist/cleanup/index.js
generated
vendored
@ -81869,7 +81869,6 @@ function generateReports() {
|
|||||||
// Prepare data
|
// Prepare data
|
||||||
const timestamps = [];
|
const timestamps = [];
|
||||||
const shas = [];
|
const shas = [];
|
||||||
// core.info("pushEvents: " + pushEvents[0].created_at)
|
|
||||||
for (let i = 0; i < pushEvents.length; i++) {
|
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);
|
shas.push(pushEvents[i].payload.commits[pushEvents[i].payload.commits.length - 1].sha);
|
||||||
@ -81877,11 +81876,8 @@ function generateReports() {
|
|||||||
const imageData = yield (0, utils_1.getImageData)(shas);
|
const imageData = yield (0, utils_1.getImageData)(shas);
|
||||||
const commitDates = (0, utils_1.formatTimestamps)(timestamps);
|
const commitDates = (0, utils_1.formatTimestamps)(timestamps);
|
||||||
const mermaidDiagramm = createHistoryDiagramm(shas, imageData, commitDates);
|
const mermaidDiagramm = createHistoryDiagramm(shas, imageData, commitDates);
|
||||||
core.info(mermaidDiagramm);
|
|
||||||
core.summary.addRaw(mermaidDiagramm);
|
core.summary.addRaw(mermaidDiagramm);
|
||||||
yield core.summary.write();
|
yield core.summary.write();
|
||||||
// Extract data for plotting
|
|
||||||
core.info(JSON.stringify(commitDates));
|
|
||||||
}
|
}
|
||||||
if (arePRBaseComparisonEnabled()) {
|
if (arePRBaseComparisonEnabled()) {
|
||||||
const prMetrics = JSON.parse(yield (0, utils_1.getPrBaseBranchMetrics)());
|
const prMetrics = JSON.parse(yield (0, utils_1.getPrBaseBranchMetrics)());
|
||||||
@ -82596,7 +82592,10 @@ function formatTimestamps(timestamps) {
|
|||||||
const formattedTimestamps = [];
|
const formattedTimestamps = [];
|
||||||
for (let i = 0; i < timestamps.length; i++) {
|
for (let i = 0; i < timestamps.length; i++) {
|
||||||
let commitTime = luxon_1.DateTime.fromISO(timestamps[i]);
|
let commitTime = luxon_1.DateTime.fromISO(timestamps[i]);
|
||||||
formattedTimestamps.push(commitTime.toISODate());
|
let commitTimeUtc = commitTime.setZone('UTC');
|
||||||
|
let commitTimeLocal = commitTimeUtc.setZone('Europe/Berlin');
|
||||||
|
let formatter = 'dd/MM/YYYY';
|
||||||
|
formattedTimestamps.push(commitTimeLocal.toFormat(formatter));
|
||||||
}
|
}
|
||||||
return (formattedTimestamps);
|
return (formattedTimestamps);
|
||||||
}
|
}
|
||||||
|
9
dist/main/index.js
generated
vendored
9
dist/main/index.js
generated
vendored
@ -81968,7 +81968,6 @@ function generateReports() {
|
|||||||
// Prepare data
|
// Prepare data
|
||||||
const timestamps = [];
|
const timestamps = [];
|
||||||
const shas = [];
|
const shas = [];
|
||||||
// core.info("pushEvents: " + pushEvents[0].created_at)
|
|
||||||
for (let i = 0; i < pushEvents.length; i++) {
|
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);
|
shas.push(pushEvents[i].payload.commits[pushEvents[i].payload.commits.length - 1].sha);
|
||||||
@ -81976,11 +81975,8 @@ function generateReports() {
|
|||||||
const imageData = yield (0, utils_1.getImageData)(shas);
|
const imageData = yield (0, utils_1.getImageData)(shas);
|
||||||
const commitDates = (0, utils_1.formatTimestamps)(timestamps);
|
const commitDates = (0, utils_1.formatTimestamps)(timestamps);
|
||||||
const mermaidDiagramm = createHistoryDiagramm(shas, imageData, commitDates);
|
const mermaidDiagramm = createHistoryDiagramm(shas, imageData, commitDates);
|
||||||
core.info(mermaidDiagramm);
|
|
||||||
core.summary.addRaw(mermaidDiagramm);
|
core.summary.addRaw(mermaidDiagramm);
|
||||||
yield core.summary.write();
|
yield core.summary.write();
|
||||||
// Extract data for plotting
|
|
||||||
core.info(JSON.stringify(commitDates));
|
|
||||||
}
|
}
|
||||||
if (arePRBaseComparisonEnabled()) {
|
if (arePRBaseComparisonEnabled()) {
|
||||||
const prMetrics = JSON.parse(yield (0, utils_1.getPrBaseBranchMetrics)());
|
const prMetrics = JSON.parse(yield (0, utils_1.getPrBaseBranchMetrics)());
|
||||||
@ -83672,7 +83668,10 @@ function formatTimestamps(timestamps) {
|
|||||||
const formattedTimestamps = [];
|
const formattedTimestamps = [];
|
||||||
for (let i = 0; i < timestamps.length; i++) {
|
for (let i = 0; i < timestamps.length; i++) {
|
||||||
let commitTime = luxon_1.DateTime.fromISO(timestamps[i]);
|
let commitTime = luxon_1.DateTime.fromISO(timestamps[i]);
|
||||||
formattedTimestamps.push(commitTime.toISODate());
|
let commitTimeUtc = commitTime.setZone('UTC');
|
||||||
|
let commitTimeLocal = commitTimeUtc.setZone('Europe/Berlin');
|
||||||
|
let formatter = 'dd/MM/YYYY';
|
||||||
|
formattedTimestamps.push(commitTimeLocal.toFormat(formatter));
|
||||||
}
|
}
|
||||||
return (formattedTimestamps);
|
return (formattedTimestamps);
|
||||||
}
|
}
|
||||||
|
@ -154,7 +154,6 @@ export async function generateReports(): Promise<void> {
|
|||||||
// Prepare data
|
// Prepare data
|
||||||
const timestamps = []
|
const timestamps = []
|
||||||
const shas = []
|
const shas = []
|
||||||
// core.info("pushEvents: " + pushEvents[0].created_at)
|
|
||||||
for (let i=0; i < pushEvents.length; i++) {
|
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)
|
shas.push(pushEvents[i].payload.commits[pushEvents[i].payload.commits.length - 1].sha)
|
||||||
@ -163,14 +162,8 @@ export async function generateReports(): Promise<void> {
|
|||||||
const imageData = await getImageData(shas)
|
const imageData = await getImageData(shas)
|
||||||
const commitDates = formatTimestamps(timestamps)
|
const commitDates = formatTimestamps(timestamps)
|
||||||
const mermaidDiagramm = createHistoryDiagramm(shas, imageData, commitDates)
|
const mermaidDiagramm = createHistoryDiagramm(shas, imageData, commitDates)
|
||||||
core.info(mermaidDiagramm)
|
|
||||||
core.summary.addRaw(mermaidDiagramm)
|
core.summary.addRaw(mermaidDiagramm)
|
||||||
await core.summary.write()
|
await core.summary.write()
|
||||||
|
|
||||||
// Extract data for plotting
|
|
||||||
core.info(JSON.stringify(commitDates))
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (arePRBaseComparisonEnabled()) {
|
if (arePRBaseComparisonEnabled()) {
|
||||||
|
@ -380,7 +380,10 @@ export function formatTimestamps(timestamps: string[]) {
|
|||||||
const formattedTimestamps = []
|
const formattedTimestamps = []
|
||||||
for (let i=0; i<timestamps.length; i++) {
|
for (let i=0; i<timestamps.length; i++) {
|
||||||
let commitTime = DateTime.fromISO(timestamps[i]);
|
let commitTime = DateTime.fromISO(timestamps[i]);
|
||||||
formattedTimestamps.push(commitTime.toISODate())
|
let commitTimeUtc = commitTime.setZone('UTC');
|
||||||
|
let commitTimeLocal = commitTimeUtc.setZone('Europe/Berlin');
|
||||||
|
let formatter = 'dd/MM/YYYY';
|
||||||
|
formattedTimestamps.push(commitTimeLocal.toFormat(formatter));
|
||||||
}
|
}
|
||||||
return(formattedTimestamps)
|
return(formattedTimestamps)
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user