Skip to content

Commit 2dced87

Browse files
committed
chore: refine comment a bit, include multiple packages
1 parent 643b1a9 commit 2dced87

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

.github/workflows/pkg.pr.new.yml

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,17 +27,22 @@ jobs:
2727
with:
2828
github-token: ${{ secrets.GITHUB_TOKEN }}
2929
script: |
30+
const fs = require('fs');
31+
const output = JSON.parse(fs.readFileSync('output.json', 'utf8'));
3032
33+
const body = (number)=>`## \`pkg.pr.new\`
3134
32-
const body = (number)=>`## \`pkg.pr.new\` for ${context.sha.substring(0, 7)}
33-
\`\`\`
34-
pnpm add https://pkg.pr.new/svelte@${number}
35+
${output.packages
36+
.map((p) => `
37+
### ${p.name}
3538
\`\`\`
39+
pnpm add https://pkg.pr.new/${p.name}@${number}
40+
\`\`\``).join('\n')}
3641
3742
[Open Playground](https://svelte.dev/playground?version=pr-${number})
3843
`;
3944
40-
const bot_comment_identifier = `## \`pkg.pr.new\` for ${context.sha.substring(0, 7)}`;
45+
const bot_comment_identifier = `## \`pkg.pr.new\``;
4146
4247
async function find_bot_comment(issue_number) {
4348
if (!issue_number) return null;

0 commit comments

Comments
 (0)