potiuk commented on code in PR #38250:
URL: https://github.com/apache/airflow/pull/38250#discussion_r1538842892
##########
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:
Rather than automatically adding max count here - can we add it as a click
`--max-count` new flag and simply add `--max-count` in the workflow ? That
would be much more flexible.
--
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]