mirror of
https://github.com/graalvm/setup-graalvm.git
synced 2025-03-14 06:50:10 +08:00
add logging for debugging
This commit is contained in:
parent
89cbb59b8e
commit
021bf5d685
8
dist/cleanup/index.js
generated
vendored
8
dist/cleanup/index.js
generated
vendored
@ -81869,6 +81869,7 @@ function generateReports() {
|
||||
// Prepare data
|
||||
const timestamps = [];
|
||||
const shas = [];
|
||||
core.info("pushEvents: " + pushEvents);
|
||||
for (const pushEvent in pushEvents) {
|
||||
timestamps.push(JSON.parse(pushEvent).created_at);
|
||||
core.info(JSON.parse(pushEvent));
|
||||
@ -82512,6 +82513,7 @@ function getPushEvents(numberOfBuilds) {
|
||||
let linkHeader = eventResponse.headers.link;
|
||||
const eventData = eventResponse.data;
|
||||
const pushEvents = [];
|
||||
core.info("1: " + linkHeader + eventData + eventResponse);
|
||||
/* for (const gitEvent in eventData ) {
|
||||
if (numberOfBuilds <= 0) {
|
||||
break
|
||||
@ -82533,6 +82535,7 @@ function getPushEvents(numberOfBuilds) {
|
||||
event.payload.ref === process.env.GITHUB_REF) {
|
||||
pushEvents.push(event);
|
||||
numberOfBuilds--;
|
||||
core.info("2");
|
||||
}
|
||||
}
|
||||
let nextPageMatch = /<([^>]+)>;\s*rel="next"/;
|
||||
@ -82540,6 +82543,7 @@ function getPushEvents(numberOfBuilds) {
|
||||
linkHeader.includes('rel="next"') &&
|
||||
numberOfBuilds > 0) {
|
||||
let nextPageUrl = nextPageMatch === null || nextPageMatch === void 0 ? void 0 : nextPageMatch.exec(linkHeader)[1];
|
||||
core.info("3");
|
||||
// Make the request for the next page
|
||||
// Assuming you use fetch API or similar for making HTTP requests
|
||||
(0, node_fetch_1.default)(nextPageUrl, {
|
||||
@ -82557,6 +82561,7 @@ function getPushEvents(numberOfBuilds) {
|
||||
event.payload.ref === process.env.GITHUB_REF) {
|
||||
pushEvents.push(event);
|
||||
numberOfBuilds--;
|
||||
core.info("4");
|
||||
}
|
||||
}
|
||||
// Update the link_header for the next iteration
|
||||
@ -82564,12 +82569,15 @@ function getPushEvents(numberOfBuilds) {
|
||||
})
|
||||
.catch((error) => {
|
||||
console.error("Error fetching next page:", error);
|
||||
core.info("5");
|
||||
});
|
||||
}
|
||||
core.info("7: " + pushEvents);
|
||||
return pushEvents;
|
||||
}
|
||||
catch (err) {
|
||||
return [];
|
||||
core.info("6");
|
||||
console.info("An error occurred during getting metrics data.");
|
||||
}
|
||||
});
|
||||
|
8
dist/main/index.js
generated
vendored
8
dist/main/index.js
generated
vendored
@ -81968,6 +81968,7 @@ function generateReports() {
|
||||
// Prepare data
|
||||
const timestamps = [];
|
||||
const shas = [];
|
||||
core.info("pushEvents: " + pushEvents);
|
||||
for (const pushEvent in pushEvents) {
|
||||
timestamps.push(JSON.parse(pushEvent).created_at);
|
||||
core.info(JSON.parse(pushEvent));
|
||||
@ -83588,6 +83589,7 @@ function getPushEvents(numberOfBuilds) {
|
||||
let linkHeader = eventResponse.headers.link;
|
||||
const eventData = eventResponse.data;
|
||||
const pushEvents = [];
|
||||
core.info("1: " + linkHeader + eventData + eventResponse);
|
||||
/* for (const gitEvent in eventData ) {
|
||||
if (numberOfBuilds <= 0) {
|
||||
break
|
||||
@ -83609,6 +83611,7 @@ function getPushEvents(numberOfBuilds) {
|
||||
event.payload.ref === process.env.GITHUB_REF) {
|
||||
pushEvents.push(event);
|
||||
numberOfBuilds--;
|
||||
core.info("2");
|
||||
}
|
||||
}
|
||||
let nextPageMatch = /<([^>]+)>;\s*rel="next"/;
|
||||
@ -83616,6 +83619,7 @@ function getPushEvents(numberOfBuilds) {
|
||||
linkHeader.includes('rel="next"') &&
|
||||
numberOfBuilds > 0) {
|
||||
let nextPageUrl = nextPageMatch === null || nextPageMatch === void 0 ? void 0 : nextPageMatch.exec(linkHeader)[1];
|
||||
core.info("3");
|
||||
// Make the request for the next page
|
||||
// Assuming you use fetch API or similar for making HTTP requests
|
||||
(0, node_fetch_1.default)(nextPageUrl, {
|
||||
@ -83633,6 +83637,7 @@ function getPushEvents(numberOfBuilds) {
|
||||
event.payload.ref === process.env.GITHUB_REF) {
|
||||
pushEvents.push(event);
|
||||
numberOfBuilds--;
|
||||
core.info("4");
|
||||
}
|
||||
}
|
||||
// Update the link_header for the next iteration
|
||||
@ -83640,12 +83645,15 @@ function getPushEvents(numberOfBuilds) {
|
||||
})
|
||||
.catch((error) => {
|
||||
console.error("Error fetching next page:", error);
|
||||
core.info("5");
|
||||
});
|
||||
}
|
||||
core.info("7: " + pushEvents);
|
||||
return pushEvents;
|
||||
}
|
||||
catch (err) {
|
||||
return [];
|
||||
core.info("6");
|
||||
console.info("An error occurred during getting metrics data.");
|
||||
}
|
||||
});
|
||||
|
@ -154,6 +154,7 @@ export async function generateReports(): Promise<void> {
|
||||
// Prepare data
|
||||
const timestamps = []
|
||||
const shas = []
|
||||
core.info("pushEvents: " + pushEvents)
|
||||
for (const pushEvent in pushEvents) {
|
||||
timestamps.push(JSON.parse(pushEvent).created_at)
|
||||
core.info(JSON.parse(pushEvent))
|
||||
|
@ -318,6 +318,7 @@ export async function getPushEvents(numberOfBuilds: number): Promise<any[]> {
|
||||
let linkHeader = eventResponse.headers.link
|
||||
const eventData: any = eventResponse.data
|
||||
const pushEvents = []
|
||||
core.info("1: " + linkHeader + eventData + eventResponse)
|
||||
|
||||
/* for (const gitEvent in eventData ) {
|
||||
if (numberOfBuilds <= 0) {
|
||||
@ -342,6 +343,7 @@ export async function getPushEvents(numberOfBuilds: number): Promise<any[]> {
|
||||
) {
|
||||
pushEvents.push(event);
|
||||
numberOfBuilds--;
|
||||
core.info("2")
|
||||
}
|
||||
}
|
||||
|
||||
@ -352,7 +354,7 @@ export async function getPushEvents(numberOfBuilds: number): Promise<any[]> {
|
||||
numberOfBuilds > 0
|
||||
) {
|
||||
let nextPageUrl = nextPageMatch?.exec(linkHeader)![1];
|
||||
|
||||
core.info("3")
|
||||
// Make the request for the next page
|
||||
// Assuming you use fetch API or similar for making HTTP requests
|
||||
fetch(nextPageUrl, {
|
||||
@ -372,6 +374,7 @@ export async function getPushEvents(numberOfBuilds: number): Promise<any[]> {
|
||||
) {
|
||||
pushEvents.push(event);
|
||||
numberOfBuilds--;
|
||||
core.info("4")
|
||||
}
|
||||
}
|
||||
|
||||
@ -380,11 +383,14 @@ export async function getPushEvents(numberOfBuilds: number): Promise<any[]> {
|
||||
})
|
||||
.catch((error) => {
|
||||
console.error("Error fetching next page:", error);
|
||||
core.info("5")
|
||||
});
|
||||
}
|
||||
core.info("7: " + pushEvents)
|
||||
return pushEvents
|
||||
} catch (err) {
|
||||
return []
|
||||
core.info("6")
|
||||
console.info("An error occurred during getting metrics data.")
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user