You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2021/02/01 12:04:07 UTC

[GitHub] [airflow] potiuk commented on a change in pull request #13767: Implement provider versioning tools

potiuk commented on a change in pull request #13767:
URL: https://github.com/apache/airflow/pull/13767#discussion_r567772471



##########
File path: dev/provider_packages/prepare_provider_packages.py
##########
@@ -747,15 +750,31 @@ def convert_git_changes_to_table(changes: str, base_url: str) -> str:
         if line == "":
             continue
         full_hash, short_hash, date, message = line.split(" ", maxsplit=3)
-        table_data.append((f"[{short_hash}]({base_url}{full_hash})", date, message))
-    return tabulate(table_data, headers=headers, tablefmt="pipe")
+        message_without_backticks = message.replace("`", "'")
+        table_data.append(
+            (
+                f"[{short_hash}]({base_url}{full_hash})"
+                if markdown
+                else f"`{short_hash} <{base_url}{full_hash}>`_",
+                date,
+                f"`{message_without_backticks}`" if markdown else f"``{message_without_backticks}``",
+            )
+        )
+    table = tabulate(table_data, headers=headers, tablefmt="pipe" if markdown else "rst")
+    header = ""
+    if not markdown:
+        header += f"\n\n{print_version}\n" + "." * len(print_version) + "\n\n"
+        release_date = table_data[0][1]
+        header += f"Latest change: {release_date}\n\n"
+    return header + table

Review comment:
       This is a table that lands in commit.rst and I think it's really eeasy to follow (those are just lists of commits). They are not supposed to be updated/modified etc - they are always automatically generted  I do not think we can make them more readable to be honest :). 
   
   See https://user-images.githubusercontent.com/595491/106393635-96531a80-63f8-11eb-8fb8-f2135f8054d8.png :) 
   
   
   
   




----------------------------------------------------------------
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:
users@infra.apache.org