amoghrajesh commented on code in PR #38250:
URL: https://github.com/apache/airflow/pull/38250#discussion_r1538891254


##########
dev/breeze/src/airflow_breeze/commands/release_management_commands.py:
##########
@@ -3149,12 +3176,33 @@ def generate_issue_content(
     excluded_pr_list: str,
     limit_pr_count: int | None,
     is_helm_chart: bool,
+    latest: bool,
 ):
     from github import Github, Issue, PullRequest, UnknownObjectException
 
     PullRequestOrIssue = Union[PullRequest.PullRequest, Issue.Issue]
     verbose = get_verbose()
-    changes = get_changes(verbose, previous_release, current_release, 
is_helm_chart)
+
+    previous = previous_release
+    current = current_release
+    max_count = 0
+
+    if latest:
+        import requests
+
+        response = requests.get("https://pypi.org/pypi/apache-airflow/json";)
+        response.raise_for_status()
+        latest_released_version = response.json()["info"]["version"]
+        previous = str(latest_released_version)
+        current = os.getenv("VERSION", "main")
+        if current == "main":
+            get_console().print(
+                "\n[warning]Environment variable VERSION not set, setting 
current release "
+                "version as 'main'\n"
+            )
+            max_count = 30

Review Comment:
   Yeah, I thought so too actually. 
   Let me make that change



-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to