Skip to content

Commit 935e9a6

Browse files
committedMar 8, 2025··
fix: abbrev test
Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
1 parent 3645c9e commit 935e9a6

File tree

3 files changed

+16
-21
lines changed

3 files changed

+16
-21
lines changed
 

‎internal/pipe/changelog/changelog.go

+1-6
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,8 @@ type Item = client.ChangelogItem
2525
// ErrInvalidSortDirection happens when the sort order is invalid.
2626
var ErrInvalidSortDirection = errors.New("invalid sort direction")
2727

28-
// ErrInvalidSortDirection happens when a group has no title.
29-
var ErrEmptyGroupTitle = errors.New("group title cannot be empty")
30-
31-
const li = "* "
32-
3328
const (
29+
li = "* "
3430
useGit = "git"
3531
useGitHub = "github"
3632
useGitea = "gitea"
@@ -475,7 +471,6 @@ func (g gitChangeloger) Log(ctx *context.Context) ([]Item, error) {
475471
type scmChangeloger struct {
476472
client client.Client
477473
repo client.Repo
478-
abbrev int
479474
}
480475

481476
func (c *scmChangeloger) Log(ctx *context.Context) ([]Item, error) {

‎internal/pipe/changelog/changelog_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -1068,6 +1068,7 @@ func TestIssue5595(t *testing.T) {
10681068
Changelog: config.Changelog{
10691069
Use: useGitHub,
10701070
Format: format,
1071+
Abbrev: 3,
10711072
Groups: []config.ChangelogGroup{
10721073
{
10731074
Title: "Features",
@@ -1125,7 +1126,6 @@ func TestIssue5595(t *testing.T) {
11251126
cl := wrappingChangeloger{
11261127
changeloger: &scmChangeloger{
11271128
client: mock,
1128-
abbrev: 3,
11291129
repo: client.Repo{
11301130
Owner: "test",
11311131
Name: "test",
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
## Changelog
22
### Features
3-
* [cafebabe]: feat: commit #2 (@Carlos)
4-
* [cafebabe]: feat: commit #4 (@Carlos)
5-
* [cafebabe]: feat: commit #6 (@Carlos)
6-
* [cafebabe]: feat: commit #8 (@Carlos)
7-
* [cafebabe]: feat: commit #12 (@Carlos)
8-
* [cafebabe]: feat: commit #16 (@Carlos)
9-
* [cafebabe]: feat: commit #18 (@Carlos)
3+
* [caf]: feat: commit #2 (@Carlos)
4+
* [caf]: feat: commit #4 (@Carlos)
5+
* [caf]: feat: commit #6 (@Carlos)
6+
* [caf]: feat: commit #8 (@Carlos)
7+
* [caf]: feat: commit #12 (@Carlos)
8+
* [caf]: feat: commit #16 (@Carlos)
9+
* [caf]: feat: commit #18 (@Carlos)
1010
### Fixes
11-
* [cafebabe]: fix: commit #1 (@Carlos)
12-
* [cafebabe]: fix: commit #3 (@Carlos)
13-
* [cafebabe]: fix: commit #9 (@Carlos)
14-
* [cafebabe]: fix: commit #11 (@Carlos)
15-
* [cafebabe]: fix: commit #13 (@Carlos)
16-
* [cafebabe]: fix: commit #17 (@Carlos)
17-
* [cafebabe]: fix: commit #19 (@Carlos)
11+
* [caf]: fix: commit #1 (@Carlos)
12+
* [caf]: fix: commit #3 (@Carlos)
13+
* [caf]: fix: commit #9 (@Carlos)
14+
* [caf]: fix: commit #11 (@Carlos)
15+
* [caf]: fix: commit #13 (@Carlos)
16+
* [caf]: fix: commit #17 (@Carlos)
17+
* [caf]: fix: commit #19 (@Carlos)

0 commit comments

Comments
 (0)
Please sign in to comment.