Skip to content

Commit a78763e

Browse files
authored
doc: Describe the process of updating CHANGELOG.md (#136)
1 parent 82e9a0c commit a78763e

File tree

4 files changed

+59
-5
lines changed

4 files changed

+59
-5
lines changed

.chglog/CHANGELOG.tpl.md

+3
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,8 @@ project adheres to [Semantic Versioning](http://semver.org/).
3636
{{ end -}}
3737

3838
{{ range .Versions }}
39+
{{ if ne .Tag.Name "v1.0.0" }}
40+
3941
<a name="{{ .Tag.Name }}"></a>
4042
## {{ if .Tag.Previous }}[{{ .Tag.Name }}]{{ else }}{{ .Tag.Name }}{{ end }} - {{ datetime "2006-01-02" .Tag.Date }}
4143
{{ if .CommitGroups -}}
@@ -64,6 +66,7 @@ project adheres to [Semantic Versioning](http://semver.org/).
6466
{{ end -}}
6567
{{ end -}}
6668
{{ end -}}
69+
{{ end -}}
6770

6871
{{- if .Versions }}
6972
[Unreleased]: {{ .Info.RepositoryURL }}/compare/{{ $latest := index .Versions 0 }}{{ $latest.Tag.Name }}...HEAD

.chglog/config.yml

+6-3
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@ options:
1111
- feat
1212
- fix
1313
- improvement
14-
- docs
14+
- enh
15+
- doc
1516
- refactor
1617
- test
1718
- ci
@@ -22,16 +23,18 @@ options:
2223
title_order:
2324
- feat
2425
- improvement
26+
- enh
2527
- refactor
2628
- fix
27-
- docs
29+
- doc
2830
- test
2931
- ci
3032
title_maps:
3133
feat: FEATURES
3234
fix: BUG FIXES
3335
improvement: ENHANCEMENTS
34-
docs: DOCS
36+
enh: ENHANCEMENTS
37+
doc: DOCS
3538
refactor: REFACTORS
3639
test: TESTS
3740
ci: CI

.github/CONTRIBUTING.md

+48-1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ Please note we have a code of conduct, please follow it in all your interactions
1212
- [Pull Request Process](#pull-request-process)
1313
- [Checklists for contributions](#checklists-for-contributions)
1414
- [Semantic Pull Requests](#semantic-pull-requests)
15+
- [Updating changelog](#updating-changelog)
1516
- [Coding conventions](#coding-conventions)
1617
- [Names and approaches used in code](#names-and-approaches-used-in-code)
1718
- [Base project name](#base-project-name)
@@ -45,14 +46,60 @@ To generate changelog, Pull Requests or Commits must have semantic and must foll
4546
- `feat:` for new features
4647
- `fix:` for bug fixes
4748
- `improvement:` for enhancements
48-
- `docs:` for documentation and examples
49+
- `enh:` for enhancements
50+
- `doc:` for documentation and examples
4951
- `refactor:` for code refactoring
5052
- `test:` for tests
5153
- `ci:` for CI purpose
5254
- `chore:` for chores stuff
5355

5456
The `chore` prefix skipped during changelog generation. It can be used for `chore: update changelog` commit message by example.
5557

58+
## Updating changelog
59+
60+
All changes had been made before version 1.0.0 described in **CHANGELOG.previous.md** file. Starting from that version our Pull Requests or Commits have semantic and follow conventional specs above. So, we decided to keep new changes in **CHANGELOG.md** file.
61+
62+
**CHANGELOG.md** file should be updated after each change merged in the `main` branch. If there are several Pull Requests will be merged consistently, it's possible to update **CHANGELOG.md** once after merging all of them.
63+
64+
How to generate CHANGELOG automatically:
65+
1. Merge Pull Request using `Squash`. Your commit message must follow next rule: `doc: my commit message (#1)`, where
66+
- `doc` - type of changes (see Semantic Pull Requests)
67+
- `my commit message` - commit message
68+
- `(#1)` - Pull Request number
69+
2. Rebase your local main branch on the latest changes from `main` branch
70+
3. Run next command:
71+
```bash
72+
git-chglog -o CHANGELOG.md --next-tag $(semtag final -s minor -o)
73+
```
74+
where:
75+
`minor` - is a type of changes related to the semver
76+
77+
Utilities:
78+
* [git-chlog](https://github.com/git-chglog/git-chglog)
79+
* [semtag](https://github.com/nico2sh/semtag)
80+
4. Create a new branch, commit and push your changes
81+
5. Open Pull Request using prefix `chore:`
82+
6. Merge Pull request. Make sure your commit message looks like: `chore: Update CHANGELOG` and don't forget to clean `optional extended description`
83+
7. Create a new Release and create the new tag (you got it when ran `$(semtag final -s minor -o)`). Click `Auto-generate release notes` and edit message leaving only commit messages:
84+
```bash
85+
How it was:
86+
87+
## What's Changed
88+
* doc: Changelog process by @user_name in https://github.com/maddevsio/aws-eks-base/pull/#number
89+
* chore: Update CHANGELOG by @user_name in https://github.com/maddevsio/aws-eks-base/pull/#number
90+
91+
92+
**Full Changelog**: https://github.com/maddevsio/aws-eks-base/compare/previous_tag...new_tag
93+
```
94+
95+
```bash
96+
How it should be:
97+
98+
## What's Changed
99+
* doc: Changelog process
100+
* chore: Update CHANGELOG
101+
```
102+
56103
## Coding conventions
57104

58105
This section contains the most basic recommendations for users and contributors on coding, naming, etc. The goal is consistent, standardized, readable code. Additions, suggestions and changes are welcome.

.github/semantic.yml

+2-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@ types:
1919
- feat
2020
- fix
2121
- improvement
22-
- docs
22+
- enh
23+
- doc
2324
- refactor
2425
- test
2526
- ci

0 commit comments

Comments
 (0)