Skip to content

Commit

Permalink
chore: refine comment a bit, include multiple packages
Browse files Browse the repository at this point in the history
  • Loading branch information
paoloricciuti committed Nov 4, 2024
1 parent 643b1a9 commit 2dced87
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions .github/workflows/pkg.pr.new.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,17 +27,22 @@ jobs:
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
const fs = require('fs');
const output = JSON.parse(fs.readFileSync('output.json', 'utf8'));
const body = (number)=>`## \`pkg.pr.new\`
const body = (number)=>`## \`pkg.pr.new\` for ${context.sha.substring(0, 7)}
\`\`\`
pnpm add https://pkg.pr.new/svelte@${number}
${output.packages
.map((p) => `
### ${p.name}
\`\`\`
pnpm add https://pkg.pr.new/${p.name}@${number}
\`\`\``).join('\n')}
[Open Playground](https://svelte.dev/playground?version=pr-${number})
`;
const bot_comment_identifier = `## \`pkg.pr.new\` for ${context.sha.substring(0, 7)}`;
const bot_comment_identifier = `## \`pkg.pr.new\``;
async function find_bot_comment(issue_number) {
if (!issue_number) return null;
Expand Down

0 comments on commit 2dced87

Please sign in to comment.