Skip to content

Commit d0c8fc7

Browse files
authored
Merge pull request #5393 from camilamacedo86/contributing-commit-messages
📖 (docs): Clarify PR title and commit message format guidelines
2 parents c902bfb + 575bd3d commit d0c8fc7

2 files changed

Lines changed: 80 additions & 31 deletions

File tree

AGENTS.md

Lines changed: 41 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -132,23 +132,53 @@ make test # CI aggregate (all of above + license)
132132

133133
## PR Submission
134134

135-
### Title Format (MANDATORY)
135+
### PR Title Format (MANDATORY)
136+
137+
PR titles use **emojis** (appear in release notes).
138+
139+
Format: `:emoji: [(plugin/version)]: Description`
140+
141+
The `(plugin/version)` scope is optional; omit it for repo-wide or documentation-only changes.
142+
143+
**Emojis:**
144+
- ⚠️ (`:warning:`) - Breaking change
145+
- ✨ (`:sparkles:`) - New feature
146+
- 🐛 (`:bug:`) - Bug fix
147+
- 📖 (`:book:`) - Documentation
148+
- 🌱 (`:seedling:`) - Infrastructure/tests/refactor
149+
150+
**Examples:**
136151
```
137-
:emoji: (optional/scope): User-facing description
152+
🐛 Resolve nil pointer panic in scaffold generator
153+
✨ (helm/v2-alpha): Add cluster-scoped resource support
154+
📖 (go/v4): Update deployment documentation
155+
✨ Update dependencies to latest versions
138156
```
139157

140-
**Emojis:**
141-
- ⚠️ - Breaking change
142-
- ✨ - New feature
143-
- 🐛 - Bug fix
144-
- 📖 - Documentation
145-
- 🌱 - Infrastructure/tests/non-user-facing/refactor
158+
### Commit Message Format
159+
160+
Commit messages follow the [Conventional Commits](https://www.conventionalcommits.org/) standard.
161+
162+
Format: `<type>[optional scope]: <description>`
163+
164+
The `[optional scope]` is typically the plugin/version (e.g., `helm/v2-alpha`, `go/v4`); omit it for repo-wide or non-plugin changes.
165+
166+
**Types:**
167+
168+
- **feat**: A new feature for the user or a plugin
169+
- **fix**: A bug fix for the user or a plugin
170+
- **docs**: Documentation changes only
171+
- **test**: Adding or updating tests
172+
- **refactor**: Code change that neither fixes a bug nor adds a feature
173+
- **chore**: Changes to build process, dependencies, or maintenance tasks
174+
- **breaking**: A breaking change (can be combined with other types)
146175

147176
**Examples:**
148177
```
149-
✨ (helm/v2-alpha): Add chart generation for cluster-scoped resources
150-
🐛: Fix project creation failure when GOBIN is unset
151-
📖: Update migration guide for Go 1.25 compatibility
178+
fix: Resolve nil pointer panic in scaffold generator
179+
feat(helm/v2-alpha): Add cluster-scoped resource support
180+
docs(go/v4): Update deployment documentation
181+
chore: Update dependencies to latest versions
152182
```
153183

154184
### Pre-PR Checklist

CONTRIBUTING.md

Lines changed: 39 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -149,34 +149,53 @@ See:
149149

150150
See [VERSIONING.md](VERSIONING.md) for a full description. TL;DR:
151151

152-
Every PR should be annotated with an icon indicating whether it's
153-
a:
152+
### PR Title Format
154153

155-
- Breaking change: :warning: (`:warning:`)
156-
- Non-breaking feature: :sparkles: (`:sparkles:`)
157-
- Patch fix: :bug: (`:bug:`)
158-
- Docs: :book: (`:book:`)
159-
- Infra/Tests/Other: :seedling: (`:seedling:`)
154+
PR titles use **emojis** (appear in release notes). Format: `:emoji: (plugin/version): Description`
160155

161-
Use :ghost: (no release note) only for the PRs that change or revert unreleased
162-
changes, which don't deserve a release note. Please don't abuse it.
156+
**Emojis:**
157+
- ⚠️ (`:warning:`) - Breaking change
158+
- ✨ (`:sparkles:`) - New feature
159+
- 🐛 (`:bug:`) - Bug fix
160+
- 📖 (`:book:`) - Documentation
161+
- 🌱 (`:seedling:`) - Infrastructure/tests/refactor
162+
- 👻 (`:ghost:`) - No release note (unreleased changes only)
163163

164-
You can also use the equivalent emoji directly, since GitHub doesn't
165-
render the `:xyz:` aliases in PR titles.
164+
**Examples:**
165+
```
166+
🐛 Resolve nil pointer panic in scaffold generator
167+
✨ (helm/v2-alpha): Add cluster-scoped resource support
168+
📖 (go/v4): Update deployment documentation
169+
✨ Update dependencies to latest versions
170+
🌱 Add new GitHub action to test out doc samples
171+
```
172+
173+
### Commit Message Format
174+
175+
Commit messages follow the [Conventional Commits](https://www.conventionalcommits.org/) standard.
166176

167-
If the PR is "plugin" scoped, you may also append the responding plugin names in the prefix.
168-
[For instance](https://github.com/kubernetes-sigs/kubebuilder/commit/0b36d0c4021bbf52f29d5a990157466761ec180c):
177+
Format: `<type>[optional scope]: <description>`
169178

179+
The `[optional scope]` is typically the plugin/version (e.g., `helm/v2-alpha`, `go/v4`); omit it for repo-wide or non-plugin changes.
180+
181+
**Types:**
182+
183+
- **feat**: A new feature for the user or a plugin
184+
- **fix**: A bug fix for the user or a plugin
185+
- **docs**: Documentation changes only
186+
- **test**: Adding or updating tests
187+
- **refactor**: Code change that neither fixes a bug nor adds a feature
188+
- **chore**: Changes to build process, dependencies, or maintenance tasks
189+
- **breaking**: A breaking change (can be combined with other types)
190+
191+
**Examples:**
170192
```
171-
🐛 (kustomize/v2-alpha): Fix typo issue in the labels added to the manifests
193+
fix: Resolve nil pointer panic in scaffold generator
194+
feat(helm/v2-alpha): Add cluster-scoped resource support
195+
docs(go/v4): Update deployment documentation
196+
chore: Update dependencies to latest versions
172197
```
173198

174-
Individual commits should not be tagged separately, but will generally be
175-
assumed to match the PR. For instance, if you have a bugfix in with
176-
a breaking change, it's generally encouraged to submit the bugfix
177-
separately, but if you must put them in one PR, mark the commit
178-
separately.
179-
180199
## Where the CI Tests are configured
181200

182201
1. See the [action files](.github/workflows) to check its tests, and the scripts used on it.

0 commit comments

Comments
 (0)