Skip to content

Commit

Permalink
feat(text): Add scope information to simple output
Browse files Browse the repository at this point in the history
  • Loading branch information
fallion committed Jan 6, 2020
1 parent a85d45e commit 43d44f7
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion expected-output-simple.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ test heading

## :rocket: Features

- 0000000 ci test
- 0000000 **(ci)** ci test

## :bug: Bug fixes

Expand Down
8 changes: 8 additions & 0 deletions internal/text/build_single_commit.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,14 @@ func buildSimpleCommit(commit quoad.Commit) string {
builder.WriteString("- ")
builder.WriteString(commit.Hash.String()[:7])
builder.WriteString(" ")

if commit.Scope != "" {
builder.WriteString("**(")
builder.WriteString(commit.Scope)
builder.WriteString(")**")
builder.WriteString(" ")
}

builder.WriteString(commit.Heading)

for _, refID := range commit.Issues {
Expand Down

0 comments on commit 43d44f7

Please sign in to comment.