Skip to content

Commit

Permalink
[release]: Release version 1.4.1
Browse files Browse the repository at this point in the history
  • Loading branch information
Kamontat Chantrachirathumrong committed Jun 24, 2018
1 parent c422d11 commit 6257e50
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 20 deletions.
2 changes: 2 additions & 0 deletions config/app.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ author:
email: kamontat.c@hotmail.com
license: © 2018 Kamontat Chantrachirathumrong
versions:
- tag: 1.4.1
description: Improve list of commit key, and add more commit list
- tag: 1.4.0
description: Add more commit list, and public release version
- tag: 1.4.0-beta.4
Expand Down
7 changes: 7 additions & 0 deletions config/commit_list.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -54,3 +54,10 @@
icon: "\U0001F4F1"
name: mortar_board
title: Update dependency
- name: Refactor
key:
text: refactor
emoji:
icon: "\U000026FD"
name: fuelpump
title: Refactor code
11 changes: 0 additions & 11 deletions flags/filefolder.go

This file was deleted.

File renamed without changes.
11 changes: 2 additions & 9 deletions models/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -495,22 +495,15 @@ func GetAppLocation() LocationConfig {
func (config ConfigurationFile) CommitAsStringArray() []string {
var arr []string
for _, c := range config.CommitList {
arr = append(arr, c.Name)
arr = append(arr, fmt.Sprintf("[%s] %s", c.Key.Emoji.Icon, c.Name))
}
return arr
}

// GetCommitByName will filter by 'Commit.Name', ignore-case
func (config ConfigurationFile) GetCommitByName(key string) (result Commit, err error) {
return config.receiveOneCommit(key, func(input Commit) bool {
return strings.Contains(strings.ToLower(input.Name), strings.ToLower(key))
})
}

// GetCommitByTitle will filter by 'Commit.Title', ignore-case
func (config ConfigurationFile) GetCommitByTitle(title string) (result Commit, err error) {
return config.receiveOneCommit(title, func(input Commit) bool {
return strings.Contains(strings.ToLower(input.Title), strings.ToLower(title))
return strings.Contains(strings.ToLower(fmt.Sprintf("[%s] %s", input.Key.Emoji.Icon, input.Name)), strings.ToLower(key))
})
}

Expand Down

0 comments on commit 6257e50

Please sign in to comment.