Skip to content

Commit

Permalink
Fix according to Rasa OSS PR #11529
Browse files Browse the repository at this point in the history
  • Loading branch information
rasa-jmac committed Dec 15, 2022
1 parent 516d5e2 commit b583439
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
4 changes: 3 additions & 1 deletion changelog/_template.md.jinja2
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
{% if definitions[category]['showcontent'] %}{% for text, values in sections[section][category]|dictsort(by='value') %}{% set issue_joiner = joiner(', ') %}- {% for value in values|sort %}{{ issue_joiner() }}{{ value }}{% endfor %}: {{ text }}
{% endfor %}{% else %}- {{ sections[section][category]['']|sort|join(', ') }}{% endif %}{% if sections[section][category]|length == 0 %} No significant changes.

{% else %}{% endif %}{% endfor %}{% else %} No significant changes.
{% else %}{% endif %}{% endfor %}{% else %}

No significant changes.

{% endif %}{% endfor %}
12 changes: 6 additions & 6 deletions scripts/publish_gh_release_notes.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,11 +57,11 @@ def parse_changelog(tag_name: Text) -> Text:
if consuming_version:
version_lines.append(line)

# return default value as github release body
if not version_lines:
return "No significant changes."
# drop the first lines (version headline, not needed for GH)
return "\n".join(version_lines[2:]).strip()
if consuming_version:
# drop the first lines (version headline, not needed for GH)
return "\n".join(version_lines[2:]).strip()
else:
return None


def main():
Expand All @@ -86,7 +86,7 @@ def main():
else:
md_body = parse_changelog(tag_name)

if not md_body:
if md_body is None:
print("Failed to extract changelog entries for version from changelog.")
return 2

Expand Down

0 comments on commit b583439

Please sign in to comment.