Skip to content

Commit

Permalink
fix: support discussionCount display
Browse files Browse the repository at this point in the history
  • Loading branch information
alanhe421 committed Nov 12, 2024
1 parent 131c3c7 commit 68dd11e
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,14 @@ async function updateHomeReadme(items) {
...map];
const workflowsListStr = workflowList.join('\n');

console.log('discussionCount',discussionCount);
console.log('discussionCount', discussionCount);


console.log('readmeContent-before', readmeContent);
const newReadmeContent = readmeContent
.replace(/(?<=<!--workflow-start-->)[\s\S]*(?=<!--workflow-end-->)/, workflowsListStr)
.replace(/(?<=<!--readme:discussionCount-start-->)[\s\S]+(?=<!--readme:discussionCount-end-->)/, `${discussionCount}`);

console.log('readmeContent-after', newReadmeContent);
fs.writeFileSync(filePath, newReadmeContent);
}
}
Expand Down

0 comments on commit 68dd11e

Please sign in to comment.