Skip to content

Commit 86ac2c3

Browse files
authored
Merge the "release/v1.2.1" branch to the "main" branch
This merge integrates the `release/v1.2.1` branch, introducing a comprehensive `CONTRIBUTING.md` file and updating the `README.md`. The new `CONTRIBUTING.md` provides detailes guidelines on branching strategy, contribution workflow, commit messages, and the pull request process. This was necessary as the previous `README.md` contained a brief and outdated section on contributing. To foster community contributions and ensure consistency, this dedicated and comprehensive guide now offers a clear and structured process for anyone wishing to contribute. Concurrently, the `README.md` has been updated; its redundant "Contributing" section has been removed, and the technology stack listed in the "Built With" section has been revised from "Nginx" and "DockerSlim" to "BusyBox". This change was made to accurately reflect the project's current dependencies and to signify the transition to a more lightweight and efficient Docker image setup. This update significantly improves the contributor experience, making the documentation more accurate, organized, and professional, and enhancing overall clarity regarding project technologies.
2 parents 8594bf2 + b2eafff commit 86ac2c3

File tree

2 files changed

+222
-23
lines changed

2 files changed

+222
-23
lines changed

CONTRIBUTING.md

Lines changed: 221 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,221 @@
1+
# Contributing to Digital Clock
2+
3+
Thank you for your interest in contributing to the Digital Clock project! We welcome contributions from the community and appreciate your time and effort in helping improve this project.
4+
5+
## Table Of Contents
6+
7+
- [Contributing to Digital Clock](#contributing-to-digital-clock)
8+
- [Getting Started](#getting-started)
9+
- [Branching Strategy](#branching-strategy)
10+
- [Branch Types](#branch-types)
11+
- [Branch Naming Conventions](#branch-naming-conventions)
12+
- [Contribution Workflow](#contribution-workflow)
13+
- [Commit Message Guidelines](#commit-message-guidelines)
14+
- [Format](#format)
15+
- [Types](#types)
16+
- [Examples](#examples)
17+
- [Pull Request Process](#pull-request-process)
18+
- [PR Description Template](#pr-description-template)
19+
- [Review Process](#review-process)
20+
- [Code of Conduct](#code-of-conduct)
21+
- [Questions?](#questions)
22+
23+
## Getting Started
24+
25+
Before you begin contributing, please ensure you have:
26+
27+
- A GitHub account
28+
- Git installed on your local machine
29+
- Docker installed (for testing containerized builds)
30+
- Familiarity with HTML5, CSS3, and JavaScript (ES6)
31+
32+
## Branching Strategy
33+
34+
We follow a structured branching strategy to maintain code quality and organization:
35+
36+
### Branch Types
37+
38+
- `main`: Production branch containing stable releases only
39+
- `develop`: Development branch for integrating features before release
40+
- `feature/*`: New features (e.g., `feature/new-time-format`)
41+
- `bugfix/*`: Bug fixes (e.g., `bugfix/fix-timezone-issue`)
42+
- `refactor/*`: Code improvements (e.g., `refactor/optimize-update-logic`)
43+
- `docs/*`: Documentation updates (e.g., `docs/update-readme`)
44+
- `release/*`: Release preparation (e.g., `release/v1.2.0`)
45+
46+
### Branch Naming Conventions
47+
48+
Use descriptive, kebab-case names that clearly indicate the purpose. examples:
49+
50+
- `feature/add-24-hour-format`
51+
- `bugfix/fix-mobile-display`
52+
- `refactor/improve-logging`
53+
- `docs/update-installation-guide`
54+
55+
## Contribution Workflow
56+
57+
1. **Fork the Repository**\
58+
Start by forking the Digital Clock repository to your own GitHub account.
59+
2. **Clone Your Fork**
60+
```bash
61+
git clone https://github.com/YOUR_USERNAME/Digital-Clock-Program.git
62+
cd Digital-Clock-Program
63+
```
64+
3. **Create the Develop Branch**\
65+
If it doesn't already exist in your fork:
66+
```bash
67+
git checkout -b develop main
68+
```
69+
4. **Create Your Feature Branch**\
70+
Create a new branch from `develop`:
71+
```bash
72+
git checkout develop
73+
git pull origin develop
74+
git checkout -b feature/your-feature-name
75+
```
76+
5. **Make Your Changes**\
77+
Implement your feature or fix following the project's coding standards:
78+
- Write clean, readable code with appropriate comments
79+
- Follow existing code formatting and structure
80+
- Test your changes thoroughly
81+
- Ensure the application works as expected
82+
6. **Test Your Changes**\
83+
Build and test the Docker container locally:
84+
```bash
85+
docker build -t digital-clock-test .
86+
docker run --rm -p 8080:80 digital-clock-test
87+
```
88+
Access `http://localhost:8080` to verify your changes.
89+
7. **Commit Your Changes**\
90+
Use clear, descriptive commit messages:
91+
```bash
92+
git add .
93+
git commit -m "feat: add 24-hour time format option"
94+
```
95+
8. **Merge to Your Develop Branch**
96+
```bash
97+
git checkout develop
98+
git merge feature/your-feature-name
99+
```
100+
9. **Add Acknowledgement**\
101+
To receive credit for your contribution:
102+
```bash
103+
git checkout develop
104+
git checkout -b docs/acknowledgement
105+
```
106+
Edit the `README.md` file and add your information under the Acknowledgement section:
107+
```markdown
108+
* **Contributors:**
109+
- [Your Name](https://github.com/your-username)
110+
```
111+
Commit and merge:
112+
```bash
113+
git add README.md
114+
git commit -m "docs: add contributor acknowledgement"
115+
git checkout develop
116+
git merge docs/acknowledgement
117+
```
118+
10. **Create a Release Branch**\
119+
Once all changes are ready in `develop`:
120+
```bash
121+
git checkout -b release/v1.2.3 develop
122+
```
123+
The version number should follow Semantic Versioning:
124+
- MAJOR: Breaking changes
125+
- MINOR: New features (backward compatible)
126+
- PATCH: Bug fixes (backward compatible)
127+
11. **Push to Your Fork**
128+
```bash
129+
git push origin release/v1.2.3
130+
```
131+
12. **Create a Pull Request**\
132+
1. Go to the original Digital Clock repository on GitHub
133+
2. Click "New Pull Request"
134+
3. Select your fork's `release/v1.2.3` branch to merge into the original repository's `main` branch
135+
4. Fill out the pull request template with:
136+
- **Summary:** Brief description of your changes
137+
- **Files Changed:** List of modified files
138+
- **Key Changes:** Detailed explanation of what changed
139+
- **What To Verify:** Testing instructions for reviewers
140+
13. **Wait for Review**\
141+
The project owner will:
142+
- Review your code
143+
- Provide feedback or request changes
144+
- Merge your contribution once approved
145+
146+
## Commit Message Guidelines
147+
148+
Use conventional commit messages for clarity:
149+
150+
### Format
151+
152+
```
153+
<type>: <description>
154+
155+
[optional body]
156+
157+
[optional footer]
158+
```
159+
160+
### Types
161+
162+
- `feat`: New feature
163+
- `fix`: Bug fix
164+
- `refactor`: Code restructuring without feature changes
165+
- `docs`: Documentation updates
166+
- `style`: Code formatting (no functional changes)
167+
- `test`: Adding or updating tests
168+
- `chore`: Maintenance tasks
169+
- `perf`: Performance improvements
170+
171+
### Examples
172+
173+
```bash
174+
feat: add dark mode toggle
175+
fix: correct AM/PM display for midnight
176+
refactor: extract logging into separate module
177+
docs: update installation instructions
178+
```
179+
180+
## Pull Request Process
181+
182+
### PR Description Template
183+
184+
Your pull request should include these four sections:
185+
186+
- **Summary**\
187+
Provide a concise overview of what your PR accomplishes and why it's needed.
188+
- **Files Changed**\
189+
List all files that were modified, added, or removed.
190+
- **Key Changes**\
191+
Detail the specific changes made in each file and explain the reasoning behind them.
192+
- **What To Verify**\
193+
Provide clear testing instructions for reviewers to validate your changes.
194+
195+
### Review Process
196+
197+
1. All PRs require review by the project owner
198+
2. Address any feedback or requested changes promptly
199+
3. Keep discussions professional and constructive
200+
4. Once approved, your PR will be merged into `main`
201+
202+
## Code of Conduct
203+
204+
We are committed to providing a welcoming and inclusive environment for all contributors. By participating in this project, you agree to:
205+
206+
- Be respectful and considerate in all interactions
207+
- Welcome newcomers and help them get started
208+
- Accept constructive criticism gracefully
209+
- Focus on what is best for the community and project
210+
- Show empathy towards other community members
211+
212+
Unacceptable behavior includes harassment, discriminatory language, or any form of disrespectful conduct. If you experience or witness such behavior, please report it to the project maintainer.
213+
214+
## Questions?
215+
216+
If you have any questions about contributing, feel free to:
217+
218+
- Open an issue with the `question` label
219+
- Reach out to the project maintainer: [Amnoor Brar](https://github.com/Amnoor/)
220+
221+
Thank you for contributing to Digital Clock!

README.md

Lines changed: 1 addition & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ A simple and elegant digital clock web application, containerized with Docker an
2020
- [Getting Started](#getting-started)
2121
- [Prerequisites](#prerequisites)
2222
- [Running Locally](#running-locally)
23-
- [Contributing](#contributing)
2423
- [Acknowledgement](#acknowledgement)
2524
- [License](#license)
2625

@@ -34,8 +33,7 @@ This project is a minimalist digital clock built with fundamental web technologi
3433
* CSS3
3534
* JavaScript (ES6)
3635
* Docker
37-
* Nginx
38-
* DockerSlim
36+
* BusyBox
3937
* GitHub Actions
4038

4139
## Getting Started
@@ -82,26 +80,6 @@ You can run this application in two ways:
8280
4. **Access the application:**\
8381
Open your browser and navigate to `http://localhost:8080`.
8482

85-
## Contributing
86-
87-
Contributions are welcome! Please follow this workflow to ensure a smooth process.
88-
89-
1. **Fork the Repository:** Start by forking the project to your own GitHub account.
90-
91-
2. **Branching Strategy:**
92-
* Create a `develop` branch from `main` if it doesn't already exist in your fork.
93-
* Create a new branch for your changes *from the `develop` branch*. Please name it according to its purpose (e.g., `feature/your-feature`).
94-
95-
3. **Commit and Merge to `develop`:** After making your changes, commit them and merge your feature branch into your fork's `develop` branch.
96-
97-
4. **Update Acknowledgement:** To get credit for your work, create another branch from `develop` named `docs/acknowledgement`. Add your name and a link to your GitHub profile under the **Acknowledgement** section. Merge this branch into your `develop` branch as well.
98-
99-
5. **Create a Release Branch:** Once all your changes are in your `develop` branch, create a new branch from it. Name this branch following the pattern `release/v*` (for example, `release/v1.2.3`).
100-
101-
6. **Submit the Final Pull Request:** Create the final pull request to merge your new `release/v*` branch into the original repository's `main` branch.
102-
103-
7. **Wait for Review:** The project owner will review your changes, provide feedback, and merge your contribution.
104-
10583
## Acknowledgement
10684

10785
A big thank you to everyone who has contributed to this project.

0 commit comments

Comments
 (0)