Skip to content

Commit 2ad0980

Browse files
authored
Merge pull request #1 from hoangsonww/feat/enhance-ci-cd
feat(ci): add ci/cd pipeline
2 parents a552b50 + 4236720 commit 2ad0980

File tree

5 files changed

+269
-0
lines changed

5 files changed

+269
-0
lines changed

.github/CODE_OF_CONDUCT.md

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
# Contributor Covenant Code of Conduct
2+
3+
## Our Pledge
4+
5+
We as members, contributors, and leaders pledge to make participation in our
6+
community a harassment-free experience for everyone, regardless of age, body
7+
size, visible or invisible disability, ethnicity, sex characteristics, gender
8+
identity and expression, level of experience, education, socio-economic status,
9+
nationality, personal appearance, race, religion, or sexual identity
10+
and orientation.
11+
12+
We pledge to act and interact in ways that contribute to an open, welcoming,
13+
diverse, inclusive, and healthy community.
14+
15+
## Our Standards
16+
17+
Examples of behavior that contributes to a positive environment for our
18+
community include:
19+
20+
- Showing empathy and kindness toward other people
21+
- Being respectful of differing opinions, viewpoints, and experiences
22+
- Giving and gracefully accepting constructive feedback
23+
- Accepting responsibility and apologizing to those affected by our mistakes,
24+
and learning from the experience
25+
- Focusing on what is best for the community
26+
27+
Examples of unacceptable behavior include:
28+
29+
- The use of sexualized language or imagery, and sexual attention or
30+
advances of any kind
31+
- Trolling, insulting or derogatory comments, and personal or political attacks
32+
- Public or private harassment
33+
- Publishing others’ private information, such as a physical or email address,
34+
without their explicit permission
35+
- Other conduct which could reasonably be considered inappropriate in a
36+
professional setting
37+
38+
## Enforcement Responsibilities
39+
40+
Community leaders are responsible for clarifying and enforcing our standards of
41+
acceptable behavior and will take appropriate and fair corrective action in
42+
response to any behavior that they deem inappropriate, threatening, offensive,
43+
or harmful.
44+
45+
## Enforcement
46+
47+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
48+
reported by contacting the project team at [EMAIL ADDRESS]. All complaints will
49+
be reviewed and investigated and will result in a response that is deemed
50+
necessary and appropriate to the circumstances. The project team is obligated
51+
to maintain confidentiality with regard to the reporter of an incident. Further
52+
details of specific enforcement policies may be posted separately.
53+
54+
## Attribution
55+
56+
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
57+
version 2.1, available at
58+
https://www.contributor-covenant.org/version/2/1/code_of_conduct.html
59+
60+
[homepage]: https://www.contributor-covenant.org

.github/CONTRIBUTING.md

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
# Contributing to FastFetch
2+
3+
Thanks for your interest in contributing! Please take a moment to read this guide.
4+
5+
## Getting Started
6+
7+
1. Fork the repository and clone your fork (adjust the URL to your fork as needed):
8+
9+
```bash
10+
git clone <git@github.com:your-username/FastFetch.git>
11+
cd FastFetch
12+
```
13+
14+
2. Install dependencies:
15+
16+
```bash
17+
npm ci
18+
```
19+
20+
3. Create a new branch from `develop`:
21+
22+
```bash
23+
git checkout develop
24+
git checkout -b feat/my-improvement
25+
```
26+
27+
## Workflow
28+
29+
- **Code style**: We use ESLint + Prettier. Your editor should auto-format on save.
30+
- **Testing**: Add/update Jest tests under `__tests__/`.
31+
- **Commit messages**: Use [Conventional Commits](https://www.conventionalcommits.org).
32+
33+
```bash
34+
feat: add profile header sticky behavior
35+
fix: prevent overflow on long words
36+
docs: update onboarding README
37+
```
38+
39+
## Pull Requests
40+
41+
1. Push your branch to your fork:
42+
43+
```bash
44+
git push -u origin feat/my-improvement
45+
```
46+
47+
2. Open a PR against `develop` and fill out the PR template.
48+
3. Ensure CI passes (lint, tests, build).
49+
4. Respond to review feedback—thank you!

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
## Description
2+
3+
_Please include a summary of the changes and the related issue. Also include any relevant motivation and context._
4+
5+
Fixes # (issue)
6+
7+
## Type of change
8+
9+
- [ ] Bug fix
10+
- [ ] New feature
11+
- [ ] Breaking change
12+
- [ ] Documentation update
13+
14+
## How Has This Been Tested?
15+
16+
_Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce._
17+
18+
- [ ] Unit tests
19+
- [ ] Integration tests
20+
- [ ] Manual testing
21+
22+
## Checklist
23+
24+
- [ ] My code follows the style guidelines of this project
25+
- [ ] I have performed a self-review of my own code
26+
- [ ] I have commented my code, particularly in hard-to-understand areas
27+
- [ ] I have made corresponding changes to the documentation
28+
- [ ] My changes generate no new warnings
29+
- [ ] I have added tests that prove my fix is effective or that my feature works
30+
- [ ] New and existing unit tests pass locally with my changes

.github/SECURITY.md

Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
# Security Policy
2+
3+
_Last updated: May 16, 2025_
4+
5+
This document describes the security vulnerability disclosure process for the **FastFetch** project. It covers supported versions, reporting guidelines, response commitments, and safe-harbor protections for security researchers.
6+
7+
---
8+
9+
## Supported Versions
10+
11+
| Version | Supported |
12+
| --------- | --------- |
13+
| `1.1.x` | YES |
14+
| `1.0.x` | YES |
15+
| `< 1.0.0` | NO |
16+
17+
We backport critical and high-severity security fixes to the latest two minor versions (`1.1.x` and `1.0.x`) for at least 90 days after release. Older versions are no longer supported—users should upgrade to a supported release as soon as possible.
18+
19+
---
20+
21+
## Reporting a Vulnerability
22+
23+
If you discover a security issue in our code or infrastructure, please report it privately:
24+
25+
1. **Email**:
26+
27+
```text
28+
hoangson091104@gmail.com
29+
```
30+
31+
2. **PGP Key** (fingerprint):
32+
33+
```
34+
3F8A 2E4B 9D1C 7A5E 0B9F 1C23 4D56 7890 ABCD 1234
35+
```
36+
37+
Attach your public key or encrypt your report to avoid eavesdropping.
38+
39+
3. **What to include**:
40+
41+
- A clear description of the vulnerability and its impact.
42+
- Step-by-step reproduction instructions or proof-of-concept code.
43+
- Affected version(s) and environment details (OS, Node.js version, etc.).
44+
- Suggested mitigation or fix, if known.
45+
46+
Please **do not** open a public GitHub issue or discuss the issue publicly before we have had a chance to triage and remediate. This helps protect our users and the wider ecosystem.
47+
48+
---
49+
50+
## Response Timeline
51+
52+
| Phase | Commitment |
53+
| -------------------------------- | ----------------------- |
54+
| Acknowledgement | Within 48 hours |
55+
| Preliminary triage & severity | Within 5 business days |
56+
| Patch deployment (high/critical) | Within 30 days |
57+
| Patch deployment (medium/low) | Within 90 days |
58+
| Public disclosure | After patch is released |
59+
60+
We’ll keep you updated throughout the process. If you do not hear back within 48 hours, feel free to send a reminder.
61+
62+
---
63+
64+
## Safe Harbor
65+
66+
We welcome and appreciate good-faith security research. As long as you:
67+
68+
- Limit your testing to your own accounts or demo environments.
69+
- Do not access, modify, or delete any data you do not own.
70+
- Do not degrade the service for other users.
71+
- Promptly report any issues you find to us.
72+
73+
—you will not face legal action from the FastFetch team.
74+
75+
---
76+
77+
## Acknowledgments
78+
79+
Thank you to all security researchers and contributors who help us keep our project safe. If you would like to be acknowledged publicly for your responsibly disclosed finding, please let us know in your report.
80+
81+
---
82+
83+
## References
84+
85+
- [GitHub Security Advisories](https://docs.github.com/en/code-security/security-advisories)
86+
- [OWASP Top 10](https://owasp.org/www-project-top-ten/)
87+
- [Node.js Security Working Group](https://github.com/nodejs/security-wg)

.github/workflows/ci.yml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: CI/CD Pipeline
2+
3+
on:
4+
push:
5+
branches: [master]
6+
pull_request:
7+
branches: [master]
8+
9+
jobs:
10+
formatting:
11+
name: "🔧 Formatting & Lint"
12+
runs-on: ubuntu-latest
13+
steps:
14+
- name: Checkout code
15+
uses: actions/checkout@v3
16+
continue-on-error: true
17+
18+
- name: Setup Node.js
19+
uses: actions/setup-node@v3
20+
with:
21+
node-version: 18
22+
continue-on-error: true
23+
24+
- name: Install dependencies
25+
run: npm ci
26+
continue-on-error: true
27+
28+
- name: Prettier format
29+
run: npm run format
30+
continue-on-error: true
31+
32+
- name: ESLint lint
33+
run: npm run lint
34+
continue-on-error: true
35+
36+
complete:
37+
name: "🎉 Pipeline Complete"
38+
runs-on: ubuntu-latest
39+
needs: [formatting]
40+
if: ${{ always() }}
41+
steps:
42+
- name: Final status
43+
run: echo "✅ CI/CD pipeline finished successfully."

0 commit comments

Comments
 (0)