turbaszek commented on a change in pull request #13767:
URL: https://github.com/apache/airflow/pull/13767#discussion_r567720055
##########
File path: dev/provider_packages/prepare_provider_packages.py
##########
@@ -1088,6 +1078,60 @@ def get_additional_package_info(provider_package_path:
str) -> str:
return ""
+def get_changelog_for_package(provider_package_path: str) -> str:
+ """
+ Returns changelog_for the package.
+
+ :param provider_package_path: path for the package
+ :return: additional information for the path (empty string if missing)
+ """
+ changelog_path = os.path.join(provider_package_path, "CHANGELOG.rst")
+ if os.path.isfile(changelog_path):
+ with open(changelog_path) as changelog_file:
+ return changelog_file.read()
+ else:
+ print(f"[red]ERROR: Missing ${changelog_path}[/]")
+ print("Please add the file with initial content:")
+ print()
+ syntax = Syntax(
Review comment:
Would it make sense to extract this to a constant to move it outside of
the function?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]