From 70d15a81e27c75cb7622aacc1565bc43300052e7 Mon Sep 17 00:00:00 2001 From: Amogh Desai Date: Mon, 23 Dec 2024 11:10:22 +0530 Subject: [PATCH] Adding support for in changelog for providers (#45154) --- .../prepare_providers/provider_documentation.py | 3 +++ .../templates/CHANGELOG_TEMPLATE.rst.jinja2 | 10 ++++++++++ 2 files changed, 13 insertions(+) diff --git a/dev/breeze/src/airflow_breeze/prepare_providers/provider_documentation.py b/dev/breeze/src/airflow_breeze/prepare_providers/provider_documentation.py index 74c35989e5f65..bb7f704f9dcda 100644 --- a/dev/breeze/src/airflow_breeze/prepare_providers/provider_documentation.py +++ b/dev/breeze/src/airflow_breeze/prepare_providers/provider_documentation.py @@ -154,6 +154,7 @@ def __init__(self): self.misc: list[Change] = [] self.features: list[Change] = [] self.breaking_changes: list[Change] = [] + self.docs: list[Change] = [] self.other: list[Change] = [] @@ -936,6 +937,8 @@ def _get_changes_classified( classified_changes.features.append(change) elif type_of_change == TypeOfChange.BREAKING_CHANGE and with_breaking_changes: classified_changes.breaking_changes.append(change) + elif type_of_change == TypeOfChange.DOCUMENTATION: + classified_changes.docs.append(change) else: classified_changes.other.append(change) return classified_changes diff --git a/dev/breeze/src/airflow_breeze/templates/CHANGELOG_TEMPLATE.rst.jinja2 b/dev/breeze/src/airflow_breeze/templates/CHANGELOG_TEMPLATE.rst.jinja2 index e51939c57571c..bd59c96fa9393 100644 --- a/dev/breeze/src/airflow_breeze/templates/CHANGELOG_TEMPLATE.rst.jinja2 +++ b/dev/breeze/src/airflow_breeze/templates/CHANGELOG_TEMPLATE.rst.jinja2 @@ -60,6 +60,16 @@ Misc {%- endif %} +{%- if classified_changes and classified_changes.docs %} + +Doc-only +~~~~ +{% for doc in classified_changes.docs %} +* ``{{ doc.message_without_backticks | safe }}`` +{%- endfor %} +{%- endif %} + + .. Below changes are excluded from the changelog. Move them to appropriate section above if needed. Do not delete the lines(!): {%- if classified_changes and classified_changes.other %}