Skip to content

Commit f5f648a

Browse files
committed
feat: Enable semantic commit messages
1 parent 1acb4df commit f5f648a

File tree

2 files changed

+50
-4
lines changed

2 files changed

+50
-4
lines changed

.github/workflows/semantic.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
name: "Lint pull request title"
2+
3+
on:
4+
pull_request_target:
5+
types:
6+
- opened
7+
- edited
8+
- synchronize
9+
10+
jobs:
11+
main:
12+
name: Validate PR title for semantic commit message
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: amannn/action-semantic-pull-request@v5
16+
env:
17+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

CONTRIBUTING.md

Lines changed: 33 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,40 @@ _As contributors and maintainers of this project, and in the interest of fosteri
66

77
## Getting Started
88

9-
We have full documentation on how to get started contributing here:
9+
We have full documentation on how to get started contributing here:
1010

11-
<!---
12-
If your repo has certain guidelines for contribution, put them here ahead of the general k8s resources
13-
-->
11+
### Semantic Commit Messages
12+
13+
We use [semantic commit messages](https://www.conventionalcommits.org/en/v1.0.0/) in this repository.
14+
15+
They follow this format: `<type>[optional scope]: <description>`
16+
17+
Examples for commit messages following this are:
18+
19+
`feat: allow provided config object to extend other configs`
20+
21+
You can also include a scope within parenthesis:
22+
23+
`fix(scope): Prevent wrong calculation of storage`
24+
25+
Here's a list of types that we use:
26+
27+
| Type | Explanation |
28+
|---|---|
29+
| feat | A new feature |
30+
| fix | A bug fix |
31+
| docs | Documentation only changes |
32+
| style | Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc) |
33+
| refactor | A code change that neither fixes a bug nor adds a feature |
34+
| perf | A code change that improves performance |
35+
| test | Adding missing tests or correcting existing tests |
36+
| build |Changes that affect the build system or external dependencies (example scopes: gulp, broccoli, npm) |
37+
| ci | Changes to our CI configuration files and scripts (example scopes: Travis, Circle, BrowserStack, SauceLabs) |
38+
| chore | Other changes that don't modify src or test files |
39+
| revert | Reverts a previous commit |
40+
41+
42+
### Further Information
1443

1544
- [Contributor License Agreement](https://git.k8s.io/community/CLA.md) Kubernetes projects require that you sign a Contributor License Agreement (CLA) before we can accept your pull requests
1645
- [Kubernetes Contributor Guide](http://git.k8s.io/community/contributors/guide) - Main contributor documentation, or you can just jump directly to the [contributing section](http://git.k8s.io/community/contributors/guide#contributing)

0 commit comments

Comments
 (0)