Skip to content
This repository was archived by the owner on Jul 4, 2026. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 11 additions & 16 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,24 +58,22 @@ jobs:
merge-multiple: true

- name: Combine and post comment
uses: actions/github-script@v6
uses: actions/github-script@v8
with:
github-token: ${{secrets.GITHUB_TOKEN}}
script: |
const fs = require('fs');
const path = require('path');

const fs = await import('fs/promises');
const path = await import('path');
const testResultsDir = 'test-results';
let commentBody = '## Test Results Summary\n\n';
let overallStatus = '✅ All tests passed across all Node.js versions.';
let hasFailures = false;

const files = fs.readdirSync(testResultsDir);
const files = await fs.readdir(testResultsDir);
for (const file of files) {
if (file.startsWith('test-results-') && file.endsWith('.json')) {
const nodeVersion = file.replace('test-results-', '').replace('.json', '');
const filePath = path.join(testResultsDir, file);
const results = JSON.parse(fs.readFileSync(filePath, 'utf8'));
const results = JSON.parse(await fs.readFile(filePath, 'utf8'));

commentBody += `### Node.js ${nodeVersion}\n`;
if (results.stats.failures > 0) {
Expand All @@ -87,7 +85,8 @@ jobs:
}

for (const test of results.tests) {
commentBody += `- ${test.state === 'passed' ? '✅' : (test.state === 'failed' ? '❌' : '➖')} ${test.fullTitle}\n`; if (test.state === 'failed' && test.err) {
commentBody += `- ${test.state === 'passed' ? '✅' : (test.state === 'failed' ? '❌' : '➖')} ${test.fullTitle}\n`;
if (test.state === 'failed' && test.err && test.err.message) {
commentBody += ` \`\`\`\n ${test.err.message}\n \`\`\`\n`;
}
}
Expand All @@ -97,13 +96,9 @@ jobs:

commentBody = `${overallStatus}\n\n${commentBody}`;

const issue_number = context.issue.number;
const owner = context.repo.owner;
const repo = context.repo.repo;

github.rest.issues.createComment({
owner,
repo,
issue_number,
await github.rest.issues.createComment({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: context.issue.number,
body: commentBody
});
11 changes: 6 additions & 5 deletions .github/workflows/welcome.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,17 @@ jobs:
pull-requests: write
steps:
- name: Greet First-Time Contributors
uses: actions/first-interaction@v1
uses: actions/first-interaction@v3
with:
issue-message: |
👋 Hello @{{ github.actor }}!
repo_token: ${{ secrets.GITHUB_TOKEN }}
issue_message: |
👋 Hello @${{ github.actor }}!

Thank you for opening your first issue here! We appreciate your contribution and will review it as soon as possible. In the meantime, please check out our [contributing guidelines](https://github.com/gaureshpai/create-next-quick/blob/main/CONTRIBUTING.md) for more information.

We're excited to have you in our community!
pr-message: |
🎉 Welcome, @{{ github.actor }}!
pr_message: |
🎉 Welcome, @${{ github.actor }}!

Thank you for submitting your first Pull Request to our repository! We're thrilled to see your contribution. Our team will review it shortly.

Expand Down
Loading