|
| 1 | +--- |
| 2 | +name: itk-dev-github |
| 3 | +description: GitHub workflow guidelines for itk-dev team. Use when working with Git, creating branches, making commits, opening pull requests, or any GitHub-related development tasks. Ensures compliance with team conventions for branching, commits, changelogs, and PR workflows. |
| 4 | +--- |
| 5 | + |
| 6 | +# itk-dev GitHub Workflow |
| 7 | + |
| 8 | +## Core Rules |
| 9 | + |
| 10 | +1. **Never commit directly to main** - All changes go through pull requests |
| 11 | +2. **Always create a feature branch** for every PR |
| 12 | +3. **Every PR must include** an updated CHANGELOG and reference related GitHub issues |
| 13 | +4. **Close related issues** upon PR merge using "Closes #XX" syntax |
| 14 | + |
| 15 | +## Branch Naming |
| 16 | + |
| 17 | +Format: `feature/issue-{number}-{short-description}` |
| 18 | + |
| 19 | +Examples: |
| 20 | +- `feature/issue-123-add-user-authentication` |
| 21 | +- `feature/issue-45-fix-pagination-bug` |
| 22 | +- `feature/issue-78-update-api-endpoints` |
| 23 | + |
| 24 | +## Commit Messages |
| 25 | + |
| 26 | +Follow [Conventional Commits](https://www.conventionalcommits.org/): |
| 27 | + |
| 28 | +``` |
| 29 | +<type>: <description> |
| 30 | +
|
| 31 | +[optional body] |
| 32 | +
|
| 33 | +[optional footer] |
| 34 | +``` |
| 35 | + |
| 36 | +Types: `feat`, `fix`, `docs`, `style`, `refactor`, `test`, `chore`, `perf`, `ci`, `build` |
| 37 | + |
| 38 | +Examples: |
| 39 | +- `feat: add language switcher component` |
| 40 | +- `fix: resolve pagination offset error` |
| 41 | +- `docs: update API documentation` |
| 42 | +- `refactor: extract validation logic to service` |
| 43 | + |
| 44 | +## Changelog |
| 45 | + |
| 46 | +Follow [Keep a Changelog](https://keepachangelog.com/) format. Update `CHANGELOG.md` with every PR under the `[Unreleased]` section. |
| 47 | + |
| 48 | +Categories: `Added`, `Changed`, `Deprecated`, `Removed`, `Fixed`, `Security` |
| 49 | + |
| 50 | +## Pull Request Requirements |
| 51 | + |
| 52 | +### Before Opening PR |
| 53 | +- [ ] All GitHub Actions checks pass |
| 54 | +- [ ] CHANGELOG.md updated under `[Unreleased]` |
| 55 | +- [ ] Branch is up-to-date with main |
| 56 | + |
| 57 | +### PR Description Template |
| 58 | + |
| 59 | +```markdown |
| 60 | +## Summary |
| 61 | +Brief description of what this PR does and which issue it addresses (#XX). |
| 62 | + |
| 63 | +## Features Added |
| 64 | +* Feature 1: Description |
| 65 | +* Feature 2: Description |
| 66 | + |
| 67 | +## Files Changed |
| 68 | +* `path/to/file.ext` - What changed |
| 69 | +* `path/to/new-file.ext` (new) - Purpose |
| 70 | + |
| 71 | +## Test Plan |
| 72 | +* Step-by-step verification instructions |
| 73 | +* Expected outcomes for each test |
| 74 | + |
| 75 | +Closes #XX |
| 76 | +``` |
| 77 | + |
| 78 | +### Review Requirements |
| 79 | +- Minimum **one approving review** required before merge |
| 80 | +- All GitHub Actions checks must pass |
0 commit comments