diff --git a/changelogs/fragments/397-ansible-core-version-in-porting-guide.yml b/changelogs/fragments/397-ansible-core-version-in-porting-guide.yml new file mode 100644 index 00000000..58d5faa4 --- /dev/null +++ b/changelogs/fragments/397-ansible-core-version-in-porting-guide.yml @@ -0,0 +1,2 @@ +minor_changes: + - "Mention the ``ansible-core`` major version in the Ansible porting guide (https://github.com/ansible-community/antsibull/pull/397)." diff --git a/src/antsibull/build_changelog.py b/src/antsibull/build_changelog.py index 24079af7..d24d8123 100644 --- a/src/antsibull/build_changelog.py +++ b/src/antsibull/build_changelog.py @@ -614,6 +614,12 @@ def _get_porting_guide_bytes(changelog: Changelog) -> bytes: # Determine whether to include ansible-core porting guide or not if changelog.ansible_version.major == 2 or base_version != prev_base_version: + if changelog.ansible_version.major > 2: + builder.add_raw_rst( + # noqa: E501 + "\n" + f"Ansible {version} is based on Ansible-core {base_version}." + "\n") builder.add_raw_rst( # noqa: E501 "\n"