Skip to content

Commit 435ba95

Browse files
chore: add info about release-please to contributing guidelines
1 parent 95b2bb7 commit 435ba95

2 files changed

Lines changed: 289 additions & 0 deletions

File tree

CONTRIBUTING.md

Lines changed: 149 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,155 @@ git push origin name-of-your-bugfix-or-feature
134134

135135
11. Submit a pull request through the GitHub website.
136136

137+
# Commit Message Guidelines
138+
139+
This project uses [Conventional Commits](https://www.conventionalcommits.org/) for commit messages and [Release Please](https://github.com/googleapis/release-please) for automated releases.
140+
141+
## Conventional Commit Format
142+
143+
Commit messages should follow this format:
144+
145+
```
146+
<type>[optional scope]: <description>
147+
148+
[optional body]
149+
150+
[optional footer(s)]
151+
```
152+
153+
### Types
154+
155+
- `feat`: A new feature
156+
- `fix`: A bug fix
157+
- `docs`: Documentation only changes
158+
- `style`: Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc)
159+
- `refactor`: A code change that neither fixes a bug nor adds a feature
160+
- `perf`: A code change that improves performance
161+
- `test`: Adding missing tests or correcting existing tests
162+
- `build`: Changes that affect the build system or external dependencies
163+
- `ci`: Changes to CI configuration files and scripts
164+
- `chore`: Other changes that don't modify src or test files
165+
- `revert`: Reverts a previous commit
166+
167+
### Examples
168+
169+
```bash
170+
feat: add support for new actuator model
171+
fix: resolve memory leak in joint controller
172+
docs: update installation instructions
173+
refactor: simplify sensor calibration logic
174+
test: add unit tests for PID controller
175+
```
176+
177+
### Breaking Changes
178+
179+
Breaking changes should be indicated by adding `!` after the type/scope or by including `BREAKING CHANGE:` in the footer:
180+
181+
```bash
182+
feat!: remove deprecated API methods
183+
# or
184+
feat: add new configuration format
185+
186+
BREAKING CHANGE: Configuration file format has changed from JSON to YAML
187+
```
188+
189+
## Release Please
190+
191+
This project uses Release Please to automatically:
192+
193+
- Generate changelogs
194+
- Create releases
195+
- Update version numbers
196+
- Publish to PyPI
197+
- Deploy documentation
198+
199+
Release Please analyzes conventional commit messages to determine the type of release (major, minor, or patch) and generates appropriate release notes. This happens automatically when commits are pushed to the main branch.
200+
201+
### How Release Please Works
202+
203+
1. **On every push to main**: Release Please analyzes new commits using conventional commit format
204+
2. **Creates/updates a Release PR**: If releasable changes are found, it creates or updates a "chore: release X.Y.Z" PR
205+
3. **When Release PR is merged**: A GitHub release is created and the package is automatically published to PyPI
206+
207+
### Avoiding Unintended Releases
208+
209+
If you need to commit to main without triggering a release (for urgent fixes, documentation, etc.), use these strategies:
210+
211+
#### Skip Release Processing
212+
213+
Add `Release-As: skip` to your commit message:
214+
215+
```bash
216+
git commit -m "docs: fix typo in contributing guide
217+
218+
Release-As: skip"
219+
```
220+
221+
#### Use Non-Release Commit Types
222+
223+
Some commit types don't trigger releases by default:
224+
225+
- `chore`: Maintenance tasks
226+
- `ci`: CI/CD changes
227+
- `build`: Build system changes
228+
- `docs`: Documentation-only changes (depending on configuration)
229+
230+
```bash
231+
git commit -m "chore: update GitHub Actions workflow"
232+
```
233+
234+
### Manual Release Control
235+
236+
#### Force a Specific Version
237+
238+
Override the automatic version bump:
239+
240+
```bash
241+
git commit -m "feat: add new actuator support
242+
243+
Release-As: 2.1.0"
244+
```
245+
246+
#### Force a Patch Release
247+
248+
Convert a non-release commit into a patch release:
249+
250+
```bash
251+
git commit -m "docs: improve API documentation
252+
253+
Release-As: patch"
254+
```
255+
256+
### Working with Release Please PRs
257+
258+
When Release Please creates a release PR:
259+
260+
1. **Review the changelog**: Ensure all changes are accurately described
261+
2. **Check the version bump**: Verify it matches the significance of changes
262+
3. **Merge to release**: Merging the PR will create the GitHub release and publish to PyPI
263+
4. **Never close without merging**: This will skip the release entirely
264+
265+
The release PR will also trigger a test publication to Test PyPI for validation.
266+
267+
### Troubleshooting
268+
269+
**No Release PR created?**
270+
271+
- Ensure commits follow conventional commit format exactly
272+
- Check that commits aren't marked with `Release-As: skip`
273+
- Verify there isn't already an open Release Please PR (only one can exist)
274+
275+
**Wrong version bump?**
276+
277+
- `fix:` commits create patch releases (0.0.1)
278+
- `feat:` commits create minor releases (0.1.0)
279+
- Breaking changes (with `!` or `BREAKING CHANGE:`) create major releases (1.0.0)
280+
281+
**Need to cancel a release?**
282+
283+
- Close the Release Please PR (don't merge it)
284+
- The next qualifying commit will create a new release PR
285+
137286
# Pull Request Guidelines
138287

139288
Before you submit a pull request, check that it meets these guidelines:

docs/contributing.md

Lines changed: 140 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,146 @@ git push origin name-of-your-bugfix-or-feature
134134

135135
11. Submit a pull request through the GitHub website.
136136

137+
# Commit Message Guidelines
138+
139+
This project uses [Conventional Commits](https://www.conventionalcommits.org/) for commit messages and [Release Please](https://github.com/googleapis/release-please) for automated releases.
140+
141+
## Conventional Commit Format
142+
143+
Commit messages should follow this format:
144+
145+
```
146+
<type>[optional scope]: <description>
147+
148+
[optional body]
149+
150+
[optional footer(s)]
151+
```
152+
153+
### Types
154+
155+
- `feat`: A new feature
156+
- `fix`: A bug fix
157+
- `docs`: Documentation only changes
158+
- `style`: Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc)
159+
- `refactor`: A code change that neither fixes a bug nor adds a feature
160+
- `perf`: A code change that improves performance
161+
- `test`: Adding missing tests or correcting existing tests
162+
- `build`: Changes that affect the build system or external dependencies
163+
- `ci`: Changes to CI configuration files and scripts
164+
- `chore`: Other changes that don't modify src or test files
165+
- `revert`: Reverts a previous commit
166+
167+
### Examples
168+
169+
```bash
170+
feat: add support for new actuator model
171+
fix: resolve memory leak in joint controller
172+
docs: update installation instructions
173+
refactor: simplify sensor calibration logic
174+
test: add unit tests for PID controller
175+
```
176+
177+
### Breaking Changes
178+
179+
Breaking changes should be indicated by adding `!` after the type/scope or by including `BREAKING CHANGE:` in the footer:
180+
181+
```bash
182+
feat!: remove deprecated API methods
183+
# or
184+
feat: add new configuration format
185+
186+
BREAKING CHANGE: Configuration file format has changed from JSON to YAML
187+
```
188+
189+
## Release Please
190+
191+
This project uses Release Please to automatically:
192+
- Generate changelogs
193+
- Create releases
194+
- Update version numbers
195+
- Publish to PyPI
196+
- Deploy documentation
197+
198+
Release Please analyzes conventional commit messages to determine the type of release (major, minor, or patch) and generates appropriate release notes. This happens automatically when commits are pushed to the main branch.
199+
200+
### How Release Please Works
201+
202+
1. **On every push to main**: Release Please analyzes new commits using conventional commit format
203+
2. **Creates/updates a Release PR**: If releasable changes are found, it creates or updates a "chore: release X.Y.Z" PR
204+
3. **When Release PR is merged**: A GitHub release is created and the package is automatically published to PyPI
205+
206+
### Avoiding Unintended Releases
207+
208+
If you need to commit to main without triggering a release (for urgent fixes, documentation, etc.), use these strategies:
209+
210+
#### Skip Release Processing
211+
Add `Release-As: skip` to your commit message:
212+
213+
```bash
214+
git commit -m "docs: fix typo in contributing guide
215+
216+
Release-As: skip"
217+
```
218+
219+
#### Use Non-Release Commit Types
220+
Some commit types don't trigger releases by default:
221+
- `chore`: Maintenance tasks
222+
- `ci`: CI/CD changes
223+
- `build`: Build system changes
224+
- `docs`: Documentation-only changes (depending on configuration)
225+
226+
```bash
227+
git commit -m "chore: update GitHub Actions workflow"
228+
```
229+
230+
### Manual Release Control
231+
232+
#### Force a Specific Version
233+
Override the automatic version bump:
234+
235+
```bash
236+
git commit -m "feat: add new actuator support
237+
238+
Release-As: 2.1.0"
239+
```
240+
241+
#### Force a Patch Release
242+
Convert a non-release commit into a patch release:
243+
244+
```bash
245+
git commit -m "docs: improve API documentation
246+
247+
Release-As: patch"
248+
```
249+
250+
### Working with Release Please PRs
251+
252+
When Release Please creates a release PR:
253+
254+
1. **Review the changelog**: Ensure all changes are accurately described
255+
2. **Check the version bump**: Verify it matches the significance of changes
256+
3. **Merge to release**: Merging the PR will create the GitHub release and publish to PyPI
257+
4. **Never close without merging**: This will skip the release entirely
258+
259+
The release PR will also trigger a test publication to Test PyPI for validation.
260+
261+
### Troubleshooting
262+
263+
**No Release PR created?**
264+
- Ensure commits follow conventional commit format exactly
265+
- Check that commits aren't marked with `Release-As: skip`
266+
- Verify there isn't already an open Release Please PR (only one can exist)
267+
268+
**Wrong version bump?**
269+
- `fix:` commits create patch releases (0.0.1)
270+
- `feat:` commits create minor releases (0.1.0)
271+
- Breaking changes (with `!` or `BREAKING CHANGE:`) create major releases (1.0.0)
272+
273+
**Need to cancel a release?**
274+
- Close the Release Please PR (don't merge it)
275+
- The next qualifying commit will create a new release PR
276+
137277
# Pull Request Guidelines
138278

139279
Before you submit a pull request, check that it meets these guidelines:

0 commit comments

Comments
 (0)