Skip to content

Commit

Permalink
refactor: update commit message conventions and integration method
Browse files Browse the repository at this point in the history
- Change the `use` field value from `git` to `github`
- Add new groups for commit messages under different titles
- Remove exclusion filters for commit messages in the changelog
- Delete an unnecessary line in the `main.go` file

Signed-off-by: appleboy <appleboy.tw@gmail.com>
  • Loading branch information
appleboy committed Apr 21, 2024
1 parent a81f182 commit 93c4413
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 39 deletions.
48 changes: 10 additions & 38 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -85,32 +85,7 @@ snapshot:
name_template: "{{ incpatch .Version }}"

changelog:
# Set it to true if you wish to skip the changelog generation.
# This may result in an empty release notes on GitHub/GitLab/Gitea.
skip: false

# Changelog generation implementation to use.
#
# Valid options are:
# - `git`: uses `git log`;
# - `github`: uses the compare GitHub API, appending the author login to the changelog.
# - `gitlab`: uses the compare GitLab API, appending the author name and email to the changelog.
# - `github-native`: uses the GitHub release notes generation API, disables the groups feature.
#
# Defaults to `git`.
use: git

# Sorts the changelog by the commit's messages.
# Could either be asc, desc or empty
# Default is empty
sort: asc

# Group commits messages by given regex and title.
# Order value defines the order of the groups.
# Proving no regex means all commits will be grouped under the default group.
# Groups are disabled when using github-native, as it already groups things by itself.
#
# Default is no groups.
use: github
groups:
- title: Features
regexp: "^.*feat[(\\w)]*:+.*$"
Expand All @@ -121,17 +96,14 @@ changelog:
- title: "Enhancements"
regexp: "^.*chore[(\\w)]*:+.*$"
order: 2
- title: "Refactor"
regexp: "^.*refactor[(\\w)]*:+.*$"
order: 3
- title: "Build process updates"
regexp: ^.*?(build|ci)(\(.+\))??!?:.+$
order: 4
- title: "Documentation updates"
regexp: ^.*?docs?(\(.+\))??!?:.+$
order: 4
- title: Others
order: 999

filters:
# Commit messages matching the regexp listed here will be removed from
# the changelog
# Default is empty
exclude:
- "^docs"
- "CICD"
- typo
- "CI"
- "deps"
- "dependencies"
1 change: 0 additions & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,6 @@ func main() {

if cfg.Core.HTTPProxy != "" {
err = notify.SetProxy(cfg.Core.HTTPProxy)

if err != nil {
logx.LogError.Fatalf("Set Proxy error: %v", err)
}
Expand Down

0 comments on commit 93c4413

Please sign in to comment.