Skip to content

Commit

Permalink
fix: commit range not include commit of tag
Browse files Browse the repository at this point in the history
  • Loading branch information
axetroy committed Nov 23, 2020
1 parent 8c177e0 commit f8df0ba
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1,792 deletions.
10 changes: 4 additions & 6 deletions 2_extractor/extractor.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,9 +81,11 @@ func Extract(g *client.GitClient, scope *parser.Scope) ([]*ExtractSplice, error)

if tag := getTagOfCommit(scope.Tags, commit); tag != nil {
splice := &ExtractSplice{
Name: tag.Name,
Tag: tag,
Name: tag.Name,
Tag: tag,
Commit: make([]*object.Commit, 0),
}
splice.Commit = append(splice.Commit, commit)
index++
internalLoop:
for {
Expand All @@ -97,10 +99,6 @@ func Extract(g *client.GitClient, scope *parser.Scope) ([]*ExtractSplice, error)
break internalLoop
}

if splice.Commit == nil {
splice.Commit = make([]*object.Commit, 0)
}

splice.Commit = append(splice.Commit, nextCommit)

index++
Expand Down
Loading

0 comments on commit f8df0ba

Please sign in to comment.