| | |
| | | |
| | | |
| | | # Grouping by Type |
| | | commitsByType = {"Other":[], "Features":[], "Fixes":[]} |
| | | commitsByType = {"Other":[], "Fixes":[], "Features":[]} |
| | | nonconformCommits = [] |
| | | for commit in tag[1:]: |
| | | if commit.body.commitType == CommitBody.commitTypes[5]: # fix |
| | |
| | | while len(commitsByType) > 0: |
| | | commitsByScope = {} |
| | | commitType, commits = commitsByType.popitem() |
| | | noScope = [] |
| | | if len(commits) == 0: |
| | | continue |
| | | |
| | | for commit in commits: |
| | | if commit.body.scope == None: |
| | | if "no scope" not in commitsByScope: |
| | | commitsByScope["no scope"] = [commit] |
| | | else: |
| | | commitsByScope["no scope"].append(commit) |
| | | noScope.append(commit) |
| | | elif commit.body.scope in commitsByScope: |
| | | commitsByScope[commit.body.scope].append(commit) |
| | | else: |
| | |
| | | fileTemplate.append(" - (" + commit.body.commitType + ") " + commit.body.subject + commit.appendShortHash()) |
| | | else: |
| | | fileTemplate.append(" - " + commit.body.subject + commit.appendShortHash()) |
| | | if len(noScope) > 0: |
| | | fileTemplate.append("- *no scope*") |
| | | for commit in noScope: |
| | | fileTemplate.append(" - " + commit.body.subject + commit.appendShortHash()) |
| | | |
| | | # nonconform commits |
| | | if len(nonconformCommits) > 0: |