Skip to content

Commit aeb382d

Browse files
author
ityaozm@gmail.com
committed
ci(chglog): Update changelog template and configuration
- Enhance CHANGELOG template to include commit links - Modify config.yml for sorting and grouping options - Update secret-check workflow triggers and actions - Switch to main version of trufflehog for scanning
1 parent 3338a57 commit aeb382d

File tree

3 files changed

+59
-17
lines changed

3 files changed

+59
-17
lines changed

.chglog/CHANGELOG.tpl.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ All notable changes to this project will be documented in this file.
1212
{{ range .Unreleased.CommitGroups -}}
1313
### {{ .Title }}
1414
{{ range .Commits -}}
15-
- {{ if .Scope }}**{{ .Scope }}:** {{ end }}{{ .Subject }}
15+
- {{ if .Scope }}**{{ .Scope }}:** {{ end }}{{ .Subject }} ([{{ .Hash.Short }}]({{ $.Info.RepositoryURL }}/commit/{{ .Hash.Short }}))
1616
{{ end }}
1717
{{ end -}}
1818
{{ end -}}
@@ -24,7 +24,7 @@ All notable changes to this project will be documented in this file.
2424
{{ range .CommitGroups -}}
2525
### {{ .Title }}
2626
{{ range .Commits -}}
27-
- {{ if .Scope }}**{{ .Scope }}:** {{ end }}{{ .Subject }}
27+
- {{ if .Scope }}**{{ .Scope }}:** {{ end }}{{ .Subject }} ([{{ .Hash.Short }}]({{ $.Info.RepositoryURL }}/commit/{{ .Hash.Short }}))
2828
{{ end }}
2929
{{ end -}}
3030

.chglog/config.yml

Lines changed: 45 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,15 @@
11
style: github
2+
# https://github.com/garden-io/garden/tree/main/.chglog
3+
# https://github.com/git-chglog/git-chglog
4+
# https://github.com/quay/clair/tree/main/.chglog
25
template: CHANGELOG.tpl.md
36
info:
47
title: CHANGELOG
58
repository_url: https://github.com/guanguans/ai-commit
69
options:
10+
sort: semver
711
commits:
12+
sort_by: Scope
813
filters:
914
Type:
1015
- build
@@ -19,20 +24,53 @@ options:
1924
- style
2025
- test
2126
commit_groups:
27+
group_by: Type
28+
sort_by: Custom
29+
title_order:
30+
# https://github.com/fobgochod/git-commit-message-format/blob/main/src/main/resources/messages/GitBundle.properties#L37
31+
- feat
32+
- fix
33+
- docs
34+
- style
35+
- refactor
36+
- perf
37+
- test
38+
- build
39+
- ci
40+
- chore
41+
- revert
2242
title_maps:
23-
chore: Chores
24-
ci: CI
25-
feat: Features
26-
fix: Bug Fixes
27-
perf: Performance Improvements
28-
refactor: Code Refactoring
29-
test: Tests
43+
# https://github.com/antfu/changelogithub/blob/main/src/config.ts
44+
# https://github.com/unjs/changelogen/blob/main/src/config.ts
45+
# https://gitmoji.dev/
46+
build: 📦 Builds
47+
chore: 🏡 Chores
48+
ci: 🤖 Continuous Integrations
49+
docs: 📖 Documents
50+
feat: ✨ Features # 🚀 Enhancements
51+
fix: 🐞 Bug Fixes
52+
perf: 🏎 Performance Improvements
53+
refactor: 💅 Code Refactorings
54+
revert: ⏪️ Reverts
55+
style: 🎨 Styles
56+
test: ✅ Tests
57+
58+
examples: 🏀 Examples
59+
types: 🌊 Types
3060
header:
3161
pattern: "^(\\w*)(?:\\(([\\w\\$\\.\\-\\*\\s]*)\\))?\\:\\s(.*)$"
3262
pattern_maps:
3363
- Type
3464
- Scope
3565
- Subject
66+
issues:
67+
prefix:
68+
- "#"
69+
refs:
70+
actions:
71+
- Closes
72+
- Fixes
73+
- PullRequest
3674
notes:
3775
keywords:
3876
- BREAKING CHANGE

.github/workflows/secret-check.yml

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
name: secrets check
22

3-
on: [ push ]
3+
on:
4+
workflow_dispatch:
5+
pull_request:
6+
push:
47

58
jobs:
69
security-check:
@@ -9,12 +12,13 @@ jobs:
912
- name: Checkout code
1013
uses: actions/checkout@v4
1114
with:
12-
# ref: ${{ github.ref_name }}
15+
# ref: ${{ github.ref_name }}
1316
fetch-depth: 0
14-
- name: TruffleHog OSS
15-
uses: trufflesecurity/trufflehog@v3.88.27
17+
- name: Secret Scanning
18+
uses: trufflesecurity/trufflehog@main
1619
with:
17-
# path: ./
18-
# base: ${{ github.event.repository.default_branch }}
19-
# head: ${{ github.ref_name }}
20-
extra_args: --debug --only-verified
20+
# path: ./
21+
# base: ${{ github.event.repository.default_branch }}
22+
# head: ${{ github.ref_name }}
23+
# extra_args: --results=verified,unknown --only-verified --debug
24+
extra_args: --results=verified,unknown

0 commit comments

Comments
 (0)