mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-05-30 18:06:39 +08:00
ci(claude): defer commit conventions to CONTRIBUTING.md
Remove duplicated type/scope definitions from commit skill and point to CONTRIBUTING.md as the single source of truth.
This commit is contained in:
@@ -16,22 +16,12 @@ Follow [CONTRIBUTING.md](../../CONTRIBUTING.md) for full project conventions.
|
||||
|
||||
## Steps
|
||||
|
||||
1. Check branch (`git branch --show-current`). If on `main`, create a feature branch. Use `<username>/<description>` format where `<username>` comes from `gh api user --jq .login`. If unavailable, just use `<description>`.
|
||||
2. Run `git status` and `git diff --staged`. If nothing staged, ask what to stage.
|
||||
3. Pick **type**: `feat`, `fix`, `docs`, `style`, `refactor`, `perf`, `test`, `build`, `ci`, `chore`, `revert`
|
||||
4. Pick **scope** from changed file paths (e.g. `ekf2`, `mavlink`, `sensors`).
|
||||
5. Write concise imperative description, lowercase, no period, under 72 chars.
|
||||
6. Breaking changes: `type(scope)!: description`
|
||||
7. Body (if needed): explain **why**, not what.
|
||||
8. Run `make format` or `./Tools/astyle/fix_code_style.sh <file>` on changed C/C++ files before committing.
|
||||
9. Stage and commit. No `Co-Authored-By`.
|
||||
|
||||
## Examples
|
||||
|
||||
```
|
||||
feat(ekf2): add height fusion timeout
|
||||
fix(mavlink): correct BATTERY_STATUS_V2 parsing
|
||||
refactor(navigator): simplify RTL altitude logic
|
||||
```
|
||||
1. **Read [CONTRIBUTING.md](../../CONTRIBUTING.md)** for commit message format, types, scopes, and conventions.
|
||||
2. Check branch (`git branch --show-current`). If on `main`, create a feature branch. Use `<username>/<description>` format where `<username>` comes from `gh api user --jq .login`. If unavailable, just use `<description>`.
|
||||
3. Run `git status` and `git diff --staged`. If nothing staged, ask what to stage.
|
||||
4. Follow the commit message convention from CONTRIBUTING.md: pick the correct **type** and **scope**, write a concise imperative description.
|
||||
5. Body (if needed): explain **why**, not what.
|
||||
6. Run `make format` or `./Tools/astyle/fix_code_style.sh <file>` on changed C/C++ files before committing.
|
||||
7. Stage and commit. No `Co-Authored-By`.
|
||||
|
||||
If the user provided arguments, use them as context: $ARGUMENTS
|
||||
|
||||
Reference in New Issue
Block a user