This is an automated email from the ASF dual-hosted git repository.
potiuk pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/airflow.git
The following commit(s) were added to refs/heads/main by this push:
new f337bfb07e Adding log to airflow-github for disabled progress bar
(#36782)
f337bfb07e is described below
commit f337bfb07e26fc6c4b53cfc313a4e04f0bb97c29
Author: Amogh Desai <[email protected]>
AuthorDate: Tue Jan 16 23:54:22 2024 +0530
Adding log to airflow-github for disabled progress bar (#36782)
* Adding log to airflow-github for disabled progress bar
* Adding log to airflow-github for disabled progress bar
---
dev/airflow-github | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/dev/airflow-github b/dev/airflow-github
index 4b33802aef..7d44328b3a 100755
--- a/dev/airflow-github
+++ b/dev/airflow-github
@@ -319,11 +319,15 @@ def compare(target_version, github_token,
previous_version=None, show_uncherrypi
@click.argument("previous_version")
@click.argument("target_version")
@click.argument("github-token", envvar="GITHUB_TOKEN")
[email protected]("--disable-progress", is_flag=True, help="Disable the progress
bar")
-def changelog(previous_version, target_version, github_token,
disable_progress):
[email protected]("--disable-progress-bar", is_flag=True, help="Disable the
progress bar")
+def changelog(previous_version, target_version, github_token,
disable_progress_bar):
repo = git.Repo(".", search_parent_directories=True)
# Get a list of issues/PRs that have been committed on the current branch.
log = get_commits_between(repo, previous_version, target_version)
+
+ if disable_progress_bar:
+ print(f"Processing {len(log)} commits")
+
gh = Github(github_token)
gh_repo = gh.get_repo("apache/airflow")
sections = defaultdict(list)
@@ -336,7 +340,7 @@ def changelog(previous_version, target_version,
github_token, disable_progress):
console = Console(width=180)
- with Progress(console=console, disable=disable_progress) as progress:
+ with Progress(console=console, disable=disable_progress_bar) as progress:
task = progress.add_task("Processing commits from changelog",
total=len(log))
for commit in progress.track(log, description="Processing commits from
changelog"):
tickets = pr_title_re.findall(commit["subject"])