Skip to content

Commit 0b385dc

Browse files
test summary
1 parent 2e144e0 commit 0b385dc

File tree

2 files changed

+25
-22
lines changed

2 files changed

+25
-22
lines changed

dist/blog-post-workflow.js

+12-11
Original file line numberDiff line numberDiff line change
@@ -13858,10 +13858,10 @@ var runWorkflow = async () => {
1385813858
if (result.status === "fulfilled") {
1385913859
core.info(runnerNameArray[index] + " runner succeeded. Post count: " + result.value.length);
1386013860
summaryTable.push([
13861-
{ data: `<a hfef="${runnerNameArray[index]}">${runnerNameArray[index]}</a>`, colspan: "6" },
13862-
{ data: ":white_check_mark:" },
13863-
{ data: `${result.value.length}` },
13864-
{ data: "<code> Runner succeeded </code>", colspan: "6" }
13861+
{ header: false, data: `<a href='${runnerNameArray[index]}'>${runnerNameArray[index]}</a>`, colspan: "6" },
13862+
{ header: false, data: ":white_check_mark:" },
13863+
{ header: false, data: `${result.value.length}` },
13864+
{ header: false, data: "<code> Runner succeeded </code>", colspan: "6" }
1386513865
]);
1386613866
if (typeof feedNamesList[index] !== void 0 && feedNamesList[index]) {
1386713867
result.value = result.value.map((item2) => {
@@ -13950,6 +13950,7 @@ var runWorkflow = async () => {
1395013950
changedReadmeCount = changedReadmeCount + 1;
1395113951
}
1395213952
});
13953+
core.summary.addRaw(`### Summary`, true);
1395313954
if (changedReadmeCount > 0 && !SKIP_COMMITS) {
1395413955
if (!process.env.TEST_MODE) {
1395513956
await commitReadme(GITHUB_TOKEN, README_FILE_PATH_LIST).then(() => {
@@ -13969,17 +13970,17 @@ var runWorkflow = async () => {
1396913970
true
1397013971
);
1397113972
core.info(message.toString());
13972-
core.summary.addRaw(`### Summary
13973-
${message.toString()}`, true);
13974-
core.summary.addTable(summaryTable);
13975-
await core.summary.write();
1397613973
} else {
1397713974
const noChangeMessage = "No change detected, skipping";
1397813975
core.info(noChangeMessage);
13979-
core.summary.addRaw(`### Summary
13980-
${noChangeMessage}`, true);
13981-
await core.summary.write();
1398213976
}
13977+
core.summary.addRaw(`Blog posts fetched:`, true);
13978+
core.summary.addTable(summaryTable);
13979+
core.summary.addRaw(`
13980+
#### Posts written to readme: ${postsArray.length}`, true);
13981+
core.summary.addSeparator();
13982+
core.summary.addDetails("Debug Info", "Some juicy info for devs: \n\n```json\n" + JSON.stringify(postsArray, null, 2) + "\n```\n\n");
13983+
await core.summary.write();
1398313984
process.exit(jobFailFlag ? 1 : 0);
1398413985
}
1398513986
} catch (e) {

src/blog-post-workflow.js

+13-11
Original file line numberDiff line numberDiff line change
@@ -233,10 +233,10 @@ const runWorkflow = async () => {
233233
// Succeeded
234234
core.info(runnerNameArray[index] + ' runner succeeded. Post count: ' + result.value.length);
235235
summaryTable.push([
236-
{data: `<a hfef="${runnerNameArray[index]}">${runnerNameArray[index]}</a>`, colspan: '6'},
237-
{data: ':white_check_mark:'},
238-
{data: `${result.value.length}`},
239-
{data: '<code> Runner succeeded </code>', colspan: '6'}]);
236+
{header: false, data: `<a href='${runnerNameArray[index]}'>${runnerNameArray[index]}</a>`, colspan: '6'},
237+
{header: false, data: ':white_check_mark:'},
238+
{header: false, data: `${result.value.length}`},
239+
{header: false, data: '<code> Runner succeeded </code>', colspan: '6'}]);
240240
// Adds feed name to the items
241241
if (typeof feedNamesList[index] !== undefined && feedNamesList[index]) {
242242
result.value = result.value.map((item) => {
@@ -362,6 +362,7 @@ const runWorkflow = async () => {
362362
changedReadmeCount = changedReadmeCount + 1;
363363
}
364364
});
365+
core.summary.addRaw(`### Summary`, true);
365366

366367
if (changedReadmeCount > 0 && !SKIP_COMMITS) {
367368
if (!process.env.TEST_MODE) {
@@ -376,19 +377,20 @@ const runWorkflow = async () => {
376377
if (!process.env.TEST_MODE && ENABLE_KEEPALIVE) {
377378
// Do dummy commit if elapsed time is greater than 50 days
378379
const committerUsername = core.getInput('committer_username');
379-
const committerEmail = core.getInput('committer_email');
380-
const message = await keepaliveWorkflow.KeepAliveWorkflow(GITHUB_TOKEN, committerUsername, committerEmail,
380+
const committerEmail = core.getInput('committer_email');
381+
const message = await keepaliveWorkflow.KeepAliveWorkflow(GITHUB_TOKEN, committerUsername, committerEmail,
381382
core.getInput('dummy_commit_message'), 50, true);
382383
core.info(message.toString());
383-
core.summary.addRaw(`### Summary \n ${message.toString()}`, true);
384-
core.summary.addTable(summaryTable);
385-
await core.summary.write();
386384
} else {
387385
const noChangeMessage = 'No change detected, skipping';
388386
core.info(noChangeMessage);
389-
core.summary.addRaw(`### Summary \n ${noChangeMessage}`, true);
390-
await core.summary.write();
391387
}
388+
core.summary.addRaw(`Blog posts fetched:`, true);
389+
core.summary.addTable(summaryTable);
390+
core.summary.addRaw(`\n#### Posts written to readme: ${postsArray.length}`, true);
391+
core.summary.addSeparator()
392+
core.summary.addDetails('Debug Info', 'Some juicy info for devs: \n\n```json\n' + JSON.stringify(postsArray, null, 2) + '\n```\n\n');
393+
await core.summary.write();
392394
process.exit(jobFailFlag ? 1 : 0);
393395
}
394396
} catch (e) {

0 commit comments

Comments
 (0)