Skip to content

Commit 27b2fa4

Browse files
authored
Merge pull request #27 from museslabs/contribution-guidelines
docs(contrib): add contribution guidelines
2 parents 3ba0152 + 1852d3c commit 27b2fa4

File tree

2 files changed

+163
-0
lines changed

2 files changed

+163
-0
lines changed

CODE-OF-CONDUCT.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# Kyma Code of Conduct
2+
Be nice and :shipit:

CONTRIBUTING.md

Lines changed: 161 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,161 @@
1+
# Contributing to Kyma
2+
3+
Thank you for your interest in contributing to Kyma! This document provides guidelines and instructions for contributing to this project.
4+
5+
## Table of Contents
6+
7+
- [Code of Conduct](#code-of-conduct)
8+
- [Getting Started](#getting-started)
9+
- [Development Workflow](#development-workflow)
10+
- [Commit Guidelines](#commit-guidelines)
11+
- [Pull Request Process](#pull-request-process)
12+
- [Testing](#testing)
13+
- [Documentation](#documentation)
14+
15+
## Code of Conduct
16+
17+
By participating in this project, you agree to maintain a respectful environment for everyone. Please be kind and courteous to others. We're just writing some lines of code in the end of the day.
18+
19+
## Getting Started
20+
21+
1. Fork the repository
22+
2. Clone your fork:
23+
```bash
24+
git clone https://github.com/YOUR_USERNAME/kyma.git
25+
cd kyma
26+
```
27+
3. Add the upstream repository:
28+
```bash
29+
git remote add upstream https://github.com/museslabs/kyma.git
30+
```
31+
4. Create a new branch for your feature/fix:
32+
```bash
33+
git checkout -b feature/your-feature-name
34+
```
35+
36+
## Development Workflow
37+
38+
1. Keep your fork up to date:
39+
40+
```bash
41+
git fetch upstream
42+
git checkout main
43+
git rebase upstream/main
44+
```
45+
46+
2. Make your changes in a new branch
47+
3. Write tests for your changes
48+
4. Run the test suite
49+
5. Update documentation if needed
50+
6. Commit your changes following the conventional commits format
51+
7. Push to your fork
52+
8. Create a Pull Request
53+
54+
**Note**: We use rebase instead of merge to maintain a clean, linear history. When updating your branch with upstream changes, always use `git rebase` rather than `git merge`. This helps keep the commit history clean and makes it easier to review changes.
55+
56+
## Commit Guidelines
57+
58+
We follow the [Conventional Commits](https://www.conventionalcommits.org/) specification. Each commit message should be structured as follows:
59+
60+
```
61+
<type>[optional scope]: <description>
62+
63+
[optional body]
64+
65+
[optional footer(s)]
66+
```
67+
68+
Types:
69+
70+
- `feat`: A new feature
71+
- `fix`: A bug fix
72+
- `docs`: Documentation only changes
73+
- `style`: Changes that do not affect the meaning of the code
74+
- `refactor`: A code change that neither fixes a bug nor adds a feature
75+
- `perf`: A code change that improves performance
76+
- `test`: Adding missing tests or correcting existing tests
77+
- `chore`: Changes to the build process or auxiliary tools
78+
79+
Examples:
80+
81+
```
82+
feat(timer): add pause/resume functionality
83+
fix(transition): correct slide transition animation
84+
docs(readme): update installation instructions
85+
```
86+
87+
## Pull Request Process
88+
89+
1. If possible, we'd appreciate if your PR adheres to the following template:
90+
91+
```
92+
Title: provide with concise and informative title.
93+
94+
### TLDR
95+
A quick, less than 80 chars description of the changes.
96+
97+
## Change Summary
98+
- Provide list of key changes with good structure.
99+
- Mention the class name, function name, and file name.
100+
- Explain the code changes.
101+
102+
For example:
103+
## Change Summary
104+
#### Added Features:
105+
1. **New Functions in `file_name`**:
106+
- `function_name`: code description.
107+
#### Code Changes:
108+
1. **In `file_name`**:
109+
#### Documentation Updates:
110+
1. **In `file_name`**:
111+
112+
### Demo
113+
- N/A
114+
115+
### Context
116+
- N/A
117+
```
118+
119+
2. Update the README.md with details of changes if applicable
120+
3. The PR will be merged once you have the sign-off of at least one other developer
121+
4. Ensure all CI checks pass before marking your PR as ready for review
122+
5. Keep your PR up to date with the main branch by rebasing:
123+
```bash
124+
git fetch upstream
125+
git rebase upstream/main
126+
git push -f origin your-branch
127+
```
128+
129+
## Testing
130+
131+
Before submitting a PR:
132+
133+
1. Run the test suite:
134+
135+
```bash
136+
go test ./...
137+
```
138+
139+
2. Run linters:
140+
141+
```bash
142+
go vet ./...
143+
golangci-lint run
144+
```
145+
146+
3. Ensure all tests pass and there are no linting errors
147+
148+
## Documentation
149+
150+
- Update documentation for any new features or changes
151+
- Update README.md if necessary
152+
- Add comments to complex code sections
153+
154+
## Additional Guidelines
155+
156+
- Follow Go best practices and idioms
157+
- Write meaningful commit messages
158+
- Keep PRs focused and manageable in size
159+
- Be respectful in discussions
160+
161+
Thank you for contributing to Kyma! 🎉

0 commit comments

Comments
 (0)