diff --git a/.chglog/CHANGELOG.tpl.md b/.chglog/CHANGELOG.tpl.md index 1af11b84..d9419a4f 100644 --- a/.chglog/CHANGELOG.tpl.md +++ b/.chglog/CHANGELOG.tpl.md @@ -36,6 +36,8 @@ project adheres to [Semantic Versioning](http://semver.org/). {{ end -}} {{ range .Versions }} +{{ if ne .Tag.Name "v1.0.0" }} + ## {{ if .Tag.Previous }}[{{ .Tag.Name }}]{{ else }}{{ .Tag.Name }}{{ end }} - {{ datetime "2006-01-02" .Tag.Date }} {{ if .CommitGroups -}} @@ -64,6 +66,7 @@ project adheres to [Semantic Versioning](http://semver.org/). {{ end -}} {{ end -}} {{ end -}} +{{ end -}} {{- if .Versions }} [Unreleased]: {{ .Info.RepositoryURL }}/compare/{{ $latest := index .Versions 0 }}{{ $latest.Tag.Name }}...HEAD diff --git a/.chglog/config.yml b/.chglog/config.yml index 9749bef4..642f416b 100644 --- a/.chglog/config.yml +++ b/.chglog/config.yml @@ -11,7 +11,8 @@ options: - feat - fix - improvement - - docs + - enh + - doc - refactor - test - ci @@ -22,16 +23,18 @@ options: title_order: - feat - improvement + - enh - refactor - fix - - docs + - doc - test - ci title_maps: feat: FEATURES fix: BUG FIXES improvement: ENHANCEMENTS - docs: DOCS + enh: ENHANCEMENTS + doc: DOCS refactor: REFACTORS test: TESTS ci: CI diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index bff1403b..c9df4308 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -12,6 +12,7 @@ Please note we have a code of conduct, please follow it in all your interactions - [Pull Request Process](#pull-request-process) - [Checklists for contributions](#checklists-for-contributions) - [Semantic Pull Requests](#semantic-pull-requests) + - [Updating changelog](#updating-changelog) - [Coding conventions](#coding-conventions) - [Names and approaches used in code](#names-and-approaches-used-in-code) - [Base project name](#base-project-name) @@ -45,7 +46,8 @@ To generate changelog, Pull Requests or Commits must have semantic and must foll - `feat:` for new features - `fix:` for bug fixes - `improvement:` for enhancements -- `docs:` for documentation and examples +- `enh:` for enhancements +- `doc:` for documentation and examples - `refactor:` for code refactoring - `test:` for tests - `ci:` for CI purpose @@ -53,6 +55,51 @@ To generate changelog, Pull Requests or Commits must have semantic and must foll The `chore` prefix skipped during changelog generation. It can be used for `chore: update changelog` commit message by example. +## Updating changelog + +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. + +**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. + +How to generate CHANGELOG automatically: +1. Merge Pull Request using `Squash`. Your commit message must follow next rule: `doc: my commit message (#1)`, where + - `doc` - type of changes (see Semantic Pull Requests) + - `my commit message` - commit message + - `(#1)` - Pull Request number +2. Rebase your local main branch on the latest changes from `main` branch +3. Run next command: +```bash +git-chglog -o CHANGELOG.md --next-tag $(semtag final -s minor -o) +``` +where: +`minor` - is a type of changes related to the semver + +Utilities: +* [git-chlog](https://github.com/git-chglog/git-chglog) +* [semtag](https://github.com/nico2sh/semtag) +4. Create a new branch, commit and push your changes +5. Open Pull Request using prefix `chore:` +6. Merge Pull request. Make sure your commit message looks like: `chore: Update CHANGELOG` and don't forget to clean `optional extended description` +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: +```bash +How it was: + +## What's Changed +* doc: Changelog process by @user_name in https://github.com/maddevsio/aws-eks-base/pull/#number +* chore: Update CHANGELOG by @user_name in https://github.com/maddevsio/aws-eks-base/pull/#number + + +**Full Changelog**: https://github.com/maddevsio/aws-eks-base/compare/previous_tag...new_tag +``` + +```bash +How it should be: + +## What's Changed +* doc: Changelog process +* chore: Update CHANGELOG +``` + ## Coding conventions 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. diff --git a/.github/semantic.yml b/.github/semantic.yml index 376c06a6..01388fe1 100644 --- a/.github/semantic.yml +++ b/.github/semantic.yml @@ -19,7 +19,8 @@ types: - feat - fix - improvement - - docs + - enh + - doc - refactor - test - ci