Skip to content

Commit e1991cf

Browse files
committed
docs: update readme
1 parent 4aa9167 commit e1991cf

3 files changed

Lines changed: 378 additions & 171 deletions

File tree

CONTRIBUTING.md

Lines changed: 213 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,213 @@
1+
# Contributing to draphyOS
2+
3+
Thank you for your interest in contributing to draphyOS! This document provides guidelines and instructions for contributing to this project.
4+
5+
## Code of Conduct
6+
7+
By participating in this project, you agree to be respectful and create a harassment-free experience for everyone.
8+
9+
## Contribution Workflow
10+
11+
We follow a structured workflow for all contributions. Here's the process:
12+
13+
### 1. Create an Issue
14+
15+
- Before making any changes, start by creating an issue in the [GitHub issue tracker](https://github.com/draphy/draphyOS/issues)
16+
- Clearly describe the bug, feature, or improvement you want to address
17+
- Wait for a DRO issue number to be assigned in the comments
18+
19+
> **Note:** Small fixes (typos, minor docs) can skip this step — just open a PR directly.
20+
21+
### 2. Branch Naming Convention
22+
23+
Create a branch with the following naming format:
24+
25+
```
26+
username/dro-<issue-number>-<issue-title>
27+
```
28+
29+
Example:
30+
31+
```
32+
johndoe/dro-123-fix-battery-detection
33+
janedoe/dro-45-add-bluetooth-module
34+
```
35+
36+
### 3. Fork and Clone the Repository
37+
38+
- Fork the repository to your GitHub account
39+
- Clone your fork to your local machine
40+
- Add the upstream repository as a remote
41+
42+
```bash
43+
git clone https://github.com/YOUR_USERNAME/draphyOS.git
44+
cd draphyOS
45+
git remote add upstream https://github.com/draphy/draphyOS.git
46+
```
47+
48+
### 4. Set Up the Development Environment
49+
50+
```bash
51+
# Ensure you have shellcheck installed
52+
sudo dnf install ShellCheck
53+
54+
# Validate scripts
55+
shellcheck install.sh uninstall.sh
56+
57+
# Check bash syntax
58+
bash -n install.sh
59+
bash -n uninstall.sh
60+
```
61+
62+
### 5. Make Your Changes
63+
64+
- Create a new branch with the proper naming convention
65+
- Make your changes following the coding conventions
66+
- Update documentation if necessary
67+
68+
**What you can modify:**
69+
- **Configs**: Edit files in `configs/`
70+
- **Scripts**: Modify `install.sh`, `uninstall.sh`
71+
- **Docs**: Update `README.md`, `CONTRIBUTING.md`
72+
73+
### 6. Commit Guidelines
74+
75+
We use [Conventional Commits](https://www.conventionalcommits.org/) for clear and meaningful commit messages.
76+
77+
Format:
78+
79+
```
80+
<type>: <description>
81+
```
82+
83+
Where `type` is one of:
84+
85+
| Type | Description |
86+
| ---------- | ------------------------------ |
87+
| `feat` | A new feature |
88+
| `fix` | A bug fix |
89+
| `docs` | Documentation changes |
90+
| `style` | Formatting, no code change |
91+
| `refactor` | Code refactoring |
92+
| `perf` | Performance improvements |
93+
| `test` | Adding or updating tests |
94+
| `build` | Build system changes |
95+
| `ci` | CI configuration changes |
96+
| `chore` | Maintenance tasks |
97+
| `revert` | Reverting changes |
98+
99+
Example:
100+
101+
```bash
102+
git commit -m "feat: add network speed display to polybar"
103+
git commit -m "fix: correct battery detection on desktops"
104+
git commit -m "docs: update installation instructions"
105+
```
106+
107+
### 7. Pull Request Process
108+
109+
0. Before pushing, run the full local check to ensure CI will pass:
110+
111+
```bash
112+
# Lint shell scripts
113+
shellcheck install.sh uninstall.sh
114+
115+
# Check bash syntax
116+
bash -n install.sh
117+
bash -n uninstall.sh
118+
```
119+
120+
1. Push your changes to your fork
121+
2. Create a pull request against the `latest` branch
122+
3. Use this format for the PR title:
123+
```
124+
<type>: <Description starting with capital letter>
125+
```
126+
Example:
127+
```
128+
feat: Add network speed display to polybar
129+
fix: Correct battery detection on desktops
130+
docs: Update installation instructions
131+
```
132+
4. Provide a detailed description in the PR
133+
5. Link the PR to the relevant issue
134+
6. Ensure all status checks pass
135+
7. Request a review from maintainers
136+
137+
Pull requests require approval before they can be merged.
138+
139+
**PR Title Examples:**
140+
141+
| ✅ Valid | ❌ Invalid |
142+
| -------------------------------------------- | ----------------------------- |
143+
| `feat: Add network speed display to polybar` | `Added new feature` |
144+
| `fix: Correct battery detection on desktops` | `fix - battery bug` |
145+
| `docs: Update installation instructions` | `updated docs` |
146+
147+
### 8. CI Checks
148+
149+
Your PR will automatically run these checks:
150+
151+
| Check | What It Does |
152+
| ------------------ | -------------------------------------- |
153+
| **PR Title Check** | Validates conventional commit format |
154+
| **ShellCheck** | Lints shell scripts for errors |
155+
| **Conflict Check** | Detects merge conflicts with `latest` |
156+
157+
All checks must pass before merging.
158+
159+
## Development Guidelines
160+
161+
### Code Style
162+
163+
**Shell Scripts:**
164+
- Run `shellcheck` before committing
165+
- Quote variables: `"$variable"` not `$variable`
166+
- Use `[[ ]]` for conditionals (not `[ ]`)
167+
- Add comments for complex logic
168+
- Follow [Google Shell Style Guide](https://google.github.io/styleguide/shellguide.html)
169+
170+
**Config Files:**
171+
- Keep configs well-commented
172+
- Use consistent indentation
173+
- Document hardware-specific settings
174+
175+
### Testing
176+
177+
For full testing, run the installer on a Fedora system:
178+
179+
```bash
180+
./install.sh
181+
```
182+
183+
### Documentation
184+
185+
- Update documentation to reflect any changes
186+
- Use clear and concise language
187+
- Follow the existing documentation style
188+
189+
## What to Contribute
190+
191+
**Good First Issues:**
192+
- Fix typos in docs or comments
193+
- Improve error messages in scripts
194+
- Add missing keybindings to cheatsheet
195+
- Better hardware detection
196+
197+
**Feature Ideas:**
198+
- New polybar modules
199+
- Additional rofi themes
200+
- More cheatsheets (vim, tmux, etc.)
201+
- Improved install/uninstall scripts
202+
203+
## Getting Help
204+
205+
If you need help with the contribution process or have questions, feel free to:
206+
207+
- Comment on the relevant issue
208+
- Ask questions in pull requests
209+
- Open a discussion for general questions
210+
211+
---
212+
213+
Thank you for contributing to draphyOS! Your efforts help make this project better for everyone.

0 commit comments

Comments
 (0)