Skip to content

Commit

Permalink
Lock towncrier requirement to 21.3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
s0undt3ch committed Oct 19, 2021
1 parent 064ab1f commit 758d8c3
Show file tree
Hide file tree
Showing 6 changed files with 33 additions and 24 deletions.
3 changes: 2 additions & 1 deletion .pre-commit-hooks/check-changelog-entries.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@
"doc",
"trivial",
)
CHANGELOG_ENTRY_RE = re.compile(r"[\d]+\.({})\.rst?$".format("|".join(CHANGELOG_EXTENSIONS)))
CHANGELOG_ENTRY_REREX = r"^[\d]+\.({})\.rst$".format("|".join(CHANGELOG_EXTENSIONS))
CHANGELOG_ENTRY_RE = re.compile(CHANGELOG_ENTRY_REREX)


def check_changelog_entries(files):
Expand Down
2 changes: 1 addition & 1 deletion changelog/70.breaking.rst
Original file line number Diff line number Diff line change
@@ -1 +1 @@
Rename the ``SaltMaster.get_salt_cli`` to ``SaltMaster.salt_cli``, forgotten on `#50 <https://github.com/saltstack/pytest-salt-factories/issues/50>`_
Rename the ``SaltMaster.get_salt_cli`` to ``SaltMaster.salt_cli``, forgotten on `PR #50 <https://github.com/saltstack/pytest-salt-factories/pull/50>`_
42 changes: 25 additions & 17 deletions changelog/_template.rst
Original file line number Diff line number Diff line change
@@ -1,38 +1,46 @@
{% for section in sections %}
{% set underline = "-" %}
{% if section %}
{{section}}
{{ underline * section|length }}{% set underline = "~" %}
{%- macro issue_link(value) -%}
`{{ value }} <https://github.com/saltstack/pytest-salt-factories/issues/{{ value[1:] }}>`_
{%- endmacro %}

{% if top_line %}
{{ top_line }}
{{ top_underline * ((top_line)|length)}}
{% elif versiondata.name %}
{{ versiondata.name }} {{ versiondata.version }} ({{ versiondata.date }})
{{ top_underline * ((versiondata.name + versiondata.version + versiondata.date)|length + 4)}}
{% else %}
{{ versiondata.version }} ({{ versiondata.date }})
{{ top_underline * ((versiondata.version + versiondata.date)|length + 3)}}
{% endif %}
{% for section, _ in sections.items() %}
{% set underline = underlines[0] %}{% if section %}{{section}}
{{ underline * section|length }}{% set underline = underlines[1] %}

{% endif %}
{% if sections[section] %}
{% for category, val in definitions.items() if category in sections[section] %}

{% if sections[section] %}
{% for category, val in definitions.items() if category in sections[section]%}
{{ definitions[category]['name'] }}
{{ underline * definitions[category]['name']|length }}

{% 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 }} <https://github.com/saltstack/pytest-salt-factories/issues/{{ value[1:] }}>`_{% endfor %}: {{ text }}


{% for text, values in sections[section][category].items() %}
{% set issue_joiner = joiner(', ') -%}
- {% for value in values|sort %}{{ issue_joiner() }}{{ issue_link(value) }}{% endfor %}: {{ text }}
{% endfor %}
{% else %}
- {{ sections[section][category]['']|sort|join(', ') }}

{% else %}
- {{ sections[section][category]['']|join(', ') }}

{% endif %}
{% if sections[section][category]|length == 0 %}

No significant changes.


{% else %}
{% endif %}

{% endfor %}
{% else %}

No significant changes.


Expand Down
4 changes: 2 additions & 2 deletions noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -417,9 +417,9 @@ def changelog(session, draft):
"--version",
silent=True,
log=False,
)
).strip()

town_cmd = ["towncrier", "--version={}".format(version)]
town_cmd = ["towncrier", "build", "--version={}".format(version)]
if draft:
town_cmd.append("--draft")
session.run(*town_cmd)
2 changes: 1 addition & 1 deletion requirements/changelog.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
towncrier
towncrier==21.3.0
4 changes: 2 additions & 2 deletions requirements/docs.txt
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
-r base.txt
-r tests.txt
-r changelog.txt
furo
sphinx
sphinx-copybutton
sphinx-prompt
sphinxcontrib-spelling
sphinxcontrib-towncrier
towncrier >= 0.2.0a0
sphinxcontrib-towncrier >= 0.2.0a0

0 comments on commit 758d8c3

Please sign in to comment.