Skip to content

Commit 7680ada

Browse files
authored
Merge pull request #1 from draphy/draphy/dro-63-setup-draphyos-config
feat: [DRO-63] Setup draphyOS config
2 parents 7927c12 + e1991cf commit 7680ada

33 files changed

Lines changed: 3607 additions & 0 deletions

.github/workflows/release.yml

Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
branches:
6+
- latest
7+
8+
permissions:
9+
contents: write
10+
11+
jobs:
12+
release:
13+
name: Create Release
14+
runs-on: ubuntu-latest
15+
steps:
16+
- name: Checkout
17+
uses: actions/checkout@v4
18+
with:
19+
fetch-depth: 0
20+
21+
- name: Validate Scripts
22+
run: |
23+
echo "Validating shell scripts..."
24+
bash -n install.sh
25+
bash -n uninstall.sh
26+
echo "✅ Scripts are valid"
27+
28+
- name: Generate Version
29+
id: version
30+
run: |
31+
# Date-based versioning (Ubuntu-style): vYYYY.MM or vYYYY.MM.patch
32+
BASE_VERSION="v$(date +%Y.%m)"
33+
34+
# Check if this version tag already exists
35+
EXISTING=$(git tag -l "${BASE_VERSION}*" | sort -V | tail -1)
36+
37+
if [ -z "$EXISTING" ]; then
38+
VERSION="$BASE_VERSION"
39+
elif [ "$EXISTING" = "$BASE_VERSION" ]; then
40+
VERSION="${BASE_VERSION}.1"
41+
else
42+
# Extract patch number and increment
43+
PATCH=$(echo "$EXISTING" | sed "s/${BASE_VERSION}\.//")
44+
VERSION="${BASE_VERSION}.$((PATCH + 1))"
45+
fi
46+
47+
echo "version=$VERSION" >> $GITHUB_OUTPUT
48+
echo "Generated version: $VERSION"
49+
50+
- name: Generate Release Notes
51+
run: |
52+
# Get the latest release tag
53+
PREV_TAG=$(git describe --tags --abbrev=0 2>/dev/null || echo "")
54+
55+
echo "## What's Changed" > RELEASE_NOTES.md
56+
echo "" >> RELEASE_NOTES.md
57+
58+
if [ -n "$PREV_TAG" ]; then
59+
# Generate changelog from commits since last release
60+
git log --pretty=format:"- %s (%h)" $PREV_TAG..HEAD >> RELEASE_NOTES.md
61+
else
62+
# First release - show recent commits
63+
git log --pretty=format:"- %s (%h)" -20 >> RELEASE_NOTES.md
64+
fi
65+
66+
echo "" >> RELEASE_NOTES.md
67+
echo "" >> RELEASE_NOTES.md
68+
echo "## Installation" >> RELEASE_NOTES.md
69+
echo "" >> RELEASE_NOTES.md
70+
echo '```bash' >> RELEASE_NOTES.md
71+
echo 'curl -fsSL https://raw.githubusercontent.com/draphy/draphyOS/latest/install.sh | bash' >> RELEASE_NOTES.md
72+
echo '```' >> RELEASE_NOTES.md
73+
74+
echo "--- Release Notes ---"
75+
cat RELEASE_NOTES.md
76+
77+
- name: Create GitHub Release
78+
uses: softprops/action-gh-release@v2
79+
with:
80+
tag_name: ${{ steps.version.outputs.version }}
81+
name: ${{ steps.version.outputs.version }}
82+
body_path: RELEASE_NOTES.md
83+
make_latest: true
84+
env:
85+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/verify-pr.yml

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
name: Verify PR
2+
3+
on:
4+
pull_request:
5+
types: [opened, synchronize, reopened, edited]
6+
7+
permissions:
8+
contents: read
9+
pull-requests: write
10+
11+
jobs:
12+
pr-title-check:
13+
name: PR Title Check
14+
runs-on: ubuntu-latest
15+
steps:
16+
- name: Check PR Title
17+
shell: bash
18+
env:
19+
PR_TITLE: ${{ github.event.pull_request.title }}
20+
run: |
21+
echo "Checking PR title: $PR_TITLE"
22+
23+
# Define valid types (conventional commits)
24+
VALID_TYPES="feat|fix|docs|style|refactor|perf|test|build|ci|chore|revert"
25+
26+
# Simple conventional commit format: type: description
27+
if ! [[ "$PR_TITLE" =~ ^($VALID_TYPES):[[:space:]].+ ]]; then
28+
echo "::error::PR title does not match conventional commit format!"
29+
echo "::error::"
30+
echo "::error::Required format: <type>: <description>"
31+
echo "::error::"
32+
echo "::error::Valid types: feat, fix, docs, style, refactor, perf, test, build, ci, chore, revert"
33+
echo "::error::"
34+
echo "::error::Examples:"
35+
echo "::error:: feat: add network speed display to polybar"
36+
echo "::error:: fix: correct battery detection on desktops"
37+
echo "::error:: docs: update installation instructions"
38+
echo "::error:: chore: update package list"
39+
echo "::error::"
40+
echo "::error::Your title: \"$PR_TITLE\""
41+
exit 1
42+
else
43+
echo "✅ PR title format is valid!"
44+
fi
45+
46+
shellcheck:
47+
name: Shell Script Lint
48+
runs-on: ubuntu-latest
49+
steps:
50+
- name: Checkout
51+
uses: actions/checkout@v4
52+
53+
- name: Run ShellCheck
54+
uses: ludeeus/action-shellcheck@master
55+
with:
56+
scandir: '.'
57+
severity: warning
58+
env:
59+
SHELLCHECK_OPTS: -e SC1091 -e SC2034
60+
61+
label-merge-conflicts:
62+
name: Check Conflicts
63+
runs-on: ubuntu-latest
64+
steps:
65+
- name: Label Merge Conflicts
66+
uses: prince-chrismc/label-merge-conflicts-action@v3
67+
with:
68+
conflict_label_name: "conflicts"
69+
github_token: ${{ secrets.GITHUB_TOKEN }}
70+
conflict_comment: |
71+
Hi @${{ github.actor }},
72+
73+
This PR has merge conflicts with the base branch.
74+
Please rebase or merge the latest changes from `latest`.

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)