@@ -22,22 +22,22 @@ func main() {
22
22
var repoPath = flag .String ("p" , "." , "path to the repository, points to the current working directory by default" )
23
23
var startCommit = flag .String ("s" , "" , "commit hash string start collecting commit messages from" )
24
24
var endCommit = flag .String ("e" , "" , "commit hash string to stop collecting commit message at" )
25
+ var inclusionFlags = flag .String ("i" , "" , "commit types to be includes, defaults to CI FIX REFACTOR FEATURE DOCS CHORE TEST OTHER" )
25
26
26
27
flag .Parse ()
27
28
28
29
path := repoPath
29
30
30
- err := CommitLog (* path , * startCommit , * endCommit )
31
+ err := CommitLog (* path , * startCommit , * endCommit , * inclusionFlags )
31
32
32
33
if err .err != nil {
33
34
log .Fatal (err .message , err .err )
34
35
}
35
36
}
36
37
37
38
// CommitLog - Generate commit log
38
- func CommitLog (path string , startCommitString string , endCommitString string ) ErrMessage {
39
+ func CommitLog (path string , startCommitString string , endCommitString string , inclusionFlags string ) ErrMessage {
39
40
currentRepository := openRepository (path )
40
-
41
41
baseCommitReference , err := currentRepository .Head ()
42
42
var startHash , endHash * object.Commit
43
43
var cIter object.CommitIter
0 commit comments