Skip to content
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
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,4 @@ body:
label: System Info
description: Node.js version, npm version, OS
validations:
required: true
required: true
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/feature_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,4 @@ body:
id: context
attributes:
label: Additional Context
description: Any other context, screenshots, or examples?
description: Any other context, screenshots, or examples?
10 changes: 10 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,16 @@ jobs:
- name: Install dependencies
run: ${{ matrix.package-manager }} install

- name: Build package
run: ${{ matrix.package-manager }} run build

- name: Smoke test built artifact
run: |
mkdir -p test-logs
node dist/create-next-quick.js --version > test-logs/smoke-test.txt 2>&1
if [ $? -ne 0 ]; then cat test-logs/smoke-test.txt; exit 1; fi
cat test-logs/smoke-test.txt

- name: Run tests and save logs
run: |
mkdir -p test-logs
Expand Down
32 changes: 16 additions & 16 deletions .github/workflows/post-test-results.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,14 +40,14 @@ jobs:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
const fs = require('fs');

// Get all jobs from the triggering workflow run
const { data: jobs } = await github.rest.actions.listJobsForWorkflowRun({
owner: context.repo.owner,
repo: context.repo.repo,
run_id: ${{ github.event.workflow_run.id }}
});

// Extract job results for each node version
const results = jobs.jobs
.filter(job => job.name.includes('build-and-test'))
Expand Down Expand Up @@ -75,14 +75,14 @@ jobs:
htmlUrl: job.html_url
};
});

// Save results to file
fs.mkdirSync('./job-results', { recursive: true });
fs.writeFileSync(
'./job-results/results.json',
JSON.stringify(results, null, 2)
);

console.log('Job results:', JSON.stringify(results, null, 2));
return results;

Expand All @@ -99,22 +99,22 @@ jobs:
const fs = require('fs');
const owner = context.repo.owner;
const repo = context.repo.repo;

// 1) Try payload PR (works when GH provides it)
let prNumber = context.payload.workflow_run?.pull_requests?.[0]?.number;

// 2) Resolve from workflow run's head repo + head branch (works for forks)
if (!prNumber) {
const runId = context.payload.workflow_run.id;
const { data: run } = await github.rest.actions.getWorkflowRun({
owner, repo, run_id: runId
});

const headBranch = run.head_branch;
const headRepoFull = run.head_repository?.full_name;
if (headRepoFull && headBranch) {
const headSpecifier = `${headRepoFull.split('/')[0]}:${headBranch}`;

// List PRs where this fork branch is the head
const { data: prs } = await github.rest.pulls.list({
owner, repo, state: 'open', head: headSpecifier
Expand All @@ -129,12 +129,12 @@ jobs:
core.info('head_repository or head_branch missing on workflow run.');
}
}

if (!prNumber) {
core.info('No pull request associated with this run.');
return;
}

// Read job results (if generated by the earlier step)
const resultsPath = './job-results/results.json';
let results = [];
Expand All @@ -143,34 +143,34 @@ jobs:
} else {
core.info('No job results file found; proceeding with overall status only.');
}

// Build comment body
const overallStatus = context.payload.workflow_run.conclusion;
const statusEmoji = overallStatus === 'success' ? '✅'
: overallStatus === 'failure' ? '❌'
: 'ℹ️';

let body = `### ${statusEmoji} CI/CD Test Results\n\n`;
body += `**Overall Status**: ${overallStatus}\n\n`;

if (results.length) {
body += `#### Node.js Version Results:\n\n`;
for (const r of results) {
body += `- **Node ${r.nodeVersion}**: ${r.status}${r.htmlUrl ? ` ([View logs](${r.htmlUrl}))` : ''}\n`;
}
body += `\n`;
}

body += `---\n[View full workflow run](${context.payload.workflow_run.html_url})`;

// Upsert comment
const { data: comments } = await github.rest.issues.listComments({
owner, repo, issue_number: prNumber
});
const botComment = comments.find(c =>
c.user?.type === 'Bot' && c.body?.includes('CI/CD Test Results')
);

if (botComment) {
await github.rest.issues.updateComment({
owner, repo, comment_id: botComment.id, body
Expand Down
13 changes: 8 additions & 5 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ on:
workflow_dispatch:
inputs:
release_type:
description: 'Release type'
description: "Release type"
required: true
default: 'patch'
default: "patch"
type: choice
options:
- patch
Expand Down Expand Up @@ -36,16 +36,19 @@ jobs:
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
registry-url: 'https://registry.npmjs.org'
cache: 'pnpm'
node-version: "20"
registry-url: "https://registry.npmjs.org"
cache: "pnpm"

- name: Install dependencies
run: pnpm install --frozen-lockfile

- name: Run Tests
run: pnpm test

- name: Build package
run: pnpm build

- name: Configure Git
run: |
git config user.name "github-actions[bot]"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/welcome.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,4 @@ jobs:
🎉 Hi @${{ github.actor }}!

Thanks for submitting your first Pull Request!
We’re thrilled to have your contribution and will review it shortly.
We’re thrilled to have your contribution and will review it shortly.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
*node_modules
*generated-test-cases.js
dist/
*test-project
*.tgz
test-project*
Expand Down
50 changes: 27 additions & 23 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,20 @@

As maintainers and contributors of the **Create Next Quick** npm package, we pledge to make participation in our project and community a harassment-free experience for everyone. We are committed to fostering a respectful, inclusive, and healthy environment for all contributors, users, and participants, regardless of:

- Age
- Body size
- Visible or invisible disabilities
- Ethnicity
- Sex characteristics
- Gender identity and expression
- Level of technical experience
- Educational background
- Socio-economic status
- Nationality
- Personal appearance
- Race
- Religion
- Sexual identity and orientation
- Age
- Body size
- Visible or invisible disabilities
- Ethnicity
- Sex characteristics
- Gender identity and expression
- Level of technical experience
- Educational background
- Socio-economic status
- Nationality
- Personal appearance
- Race
- Religion
- Sexual identity and orientation

We pledge to prioritize the needs of our package users while maintaining a **welcoming, diverse, inclusive, and professional** development community.

Expand Down Expand Up @@ -73,20 +73,24 @@ Violations may be reported by contacting the organizing team. All reports will b
Community leaders will follow these guidelines when determining consequences:

### 1. **Correction**
- **Impact:** Inappropriate language or unprofessional behavior
- **Consequence:** Private warning, possibly with a public apology request

- **Impact:** Inappropriate language or unprofessional behavior
- **Consequence:** Private warning, possibly with a public apology request

### 2. **Warning**
- **Impact:** Serious or repeated misconduct
- **Consequence:** Formal warning with outlined future consequences

- **Impact:** Serious or repeated misconduct
- **Consequence:** Formal warning with outlined future consequences

### 3. **Temporary Ban**
- **Impact:** Sustained inappropriate behavior
- **Consequence:** Temporary exclusion from community spaces

- **Impact:** Sustained inappropriate behavior
- **Consequence:** Temporary exclusion from community spaces

### 4. **Permanent Ban**
- **Impact:** Severe or repeated violations (e.g., harassment)
- **Consequence:** Permanent ban from all **Create Next Quick** activities and spaces

- **Impact:** Severe or repeated violations (e.g., harassment)
- **Consequence:** Permanent ban from all **Create Next Quick** activities and spaces

## **Attribution**

Expand All @@ -96,4 +100,4 @@ This Code of Conduct is adapted from the **Contributor Covenant**, version 2.0:
Community Impact Guidelines are inspired by **Mozilla's enforcement ladder**.

Need help understanding this document? Visit the [Contributor Covenant FAQ](https://www.contributor-covenant.org/faq).
Translations are available [here](https://www.contributor-covenant.org/translations).
Translations are available at [Contributor Covenant translations](https://www.contributor-covenant.org/translations).
14 changes: 13 additions & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,32 +6,38 @@ Your contributions help make this project better for everyone.
## How You Can Contribute

### 🚀 Reporting Bugs

- Use the [Issues](https://github.com/gaureshpai/create-next-quick/issues) tab to report bugs
- Include your package version (`npx create-next-quick --version`)
- Provide clear steps to reproduce, expected behavior, and screenshots if applicable
- Share your environment details (Node.js and npm versions)

### 🛠️ Submitting Enhancements or Features

- Open an issue first to discuss your idea
- Please wait for approval before starting major work
- Consider compatibility with different Next.js versions

### 🧪 Writing Tests

- Add tests for new features or bug fixes
- Ensure all tests pass before submitting a PR

## Getting Started

### 1. Fork the Repository

Click the "Fork" button at the top right of the [repo](https://github.com/gaureshpai/create-next-quick).

### 2. Clone Your Fork

```bash
git clone https://github.com/your-username/create-next-quick.git
cd create-next-quick
```

### 3. Development Setup

```bash
# Install dependencies
npm install
Expand All @@ -53,21 +59,25 @@ npx create-next-quick my-app
## Submitting a Pull Request

1. Create a feature branch:

```bash
git checkout -b feature/your-feature-name
```

2. Commit your changes:

```bash
git commit -m "feat: your feature description"
```

3. Push to your fork and open a PR:

```bash
git push origin feature/your-feature-name
```

### PR Checklist

- [ ] Tests added/updated
- [ ] Documentation updated
- [ ] Code follows project style
Expand All @@ -79,9 +89,11 @@ Please review our [Code of Conduct](https://github.com/gaureshpai/create-next-qu
By participating, you agree to abide by its terms.

## Need Help?

If you have questions:

- Open an issue in our [repository](https://github.com/gaureshpai/create-next-quick/issues)
- Use the discussions tab for general queries
- Review existing issues and documentation

Happy coding! 🚀
Happy coding! 🚀
Loading
Loading