diff --git a/changelogs/fragments/647-removal-hint.yml b/changelogs/fragments/647-removal-hint.yml new file mode 100644 index 00000000..083ff6c1 --- /dev/null +++ b/changelogs/fragments/647-removal-hint.yml @@ -0,0 +1,3 @@ +minor_changes: + - "When announcing collection removals and upcoming removals in the changelog, add a note that users can still manually install removed collections + (https://github.com/ansible-community/antsibull-build/pull/647)." diff --git a/src/antsibull_build/build_changelog.py b/src/antsibull_build/build_changelog.py index 0af9b31b..793dbde9 100644 --- a/src/antsibull_build/build_changelog.py +++ b/src/antsibull_build/build_changelog.py @@ -492,6 +492,12 @@ def append_removed_collections( f"(previously included version: {collection_version})", text_format=TextFormat.RESTRUCTURED_TEXT, ) + section.ensure_paragraph_break() + section.add_text( + "You can still install a removed collection manually with" + " ``ansible-galaxy collection install ``.", + text_format=TextFormat.RESTRUCTURED_TEXT, + ) section.close() @@ -702,6 +708,12 @@ def append_porting_guide( f"(previously included version: {collection_version})", text_format=TextFormat.RESTRUCTURED_TEXT, ) + section.ensure_paragraph_break() + section.add_text( + "You can still install a removed collection manually with" + " ``ansible-galaxy collection install ``.", + text_format=TextFormat.RESTRUCTURED_TEXT, + ) section.close() for section_name in ["removed_features", "deprecated_features"]: diff --git a/src/antsibull_build/changelog.py b/src/antsibull_build/changelog.py index 9b309571..646d5a42 100644 --- a/src/antsibull_build/changelog.py +++ b/src/antsibull_build/changelog.py @@ -717,6 +717,12 @@ def _get_removal_entry( # noqa: C901, pylint:disable=too-many-branches "community_steering_committee.html#creating-community-topic>`__." ) + if sentences and reason not in ("renamed", "deprecated"): + sentences.append( + "After removal, users can still install this collection with " + f"``ansible-galaxy collection install {collection}``." + ) + if not sentences: return None return _create_fragment("deprecated_features", sentences), str(announce_version)