Skip to content

Commit

Permalink
More on fixing rendering logic
Browse files Browse the repository at this point in the history
  • Loading branch information
barseghyanartur committed Nov 22, 2019
1 parent 67dfc7c commit a307fb0
Showing 1 changed file with 12 additions and 5 deletions.
17 changes: 12 additions & 5 deletions src/matyan/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -766,32 +766,39 @@ def generate_changelog(between: str = None,

if BRANCH_TYPES.get(branch_type):
changelog.append(
"\n**{}**".format(BRANCH_TYPES.get(branch_type))
"\n**{}**{}".format(
BRANCH_TYPES.get(branch_type),
'\n' if branch_type == BRANCH_TYPE_OTHER else ''
)
)

# Add tickets
for ticket_number, ticket_data in tickets.items():
if 'title' not in ticket_data:
continue

if branch_type != BRANCH_TYPE_OTHER:
changelog.append(
"\n*{} {}*{}".format(
ticket_number,
ticket_data['title'],
'\n' if not headings_only else ''
''# '\n' if not headings_only else ''
)
)
elif not headings_only:
changelog.append('') and ticket_data.get('commits', {})

if headings_only:
continue

counter = 0
for commit_hash, commit_data in ticket_data['commits'].items():
changelog.append(
"- {} [{}]".format(
"{}- {} [{}]".format(
'\n' if counter == 0 and branch_type != BRANCH_TYPE_OTHER else '',
commit_data['title'],
commit_data['author']
)
)
counter = counter + 1
else:
releases_tree = prepare_releases_changelog(
between=between,
Expand Down

0 comments on commit a307fb0

Please sign in to comment.