From b0fc8c224f6bfddafd377346b2e89451b47fa8d9 Mon Sep 17 00:00:00 2001 From: Cursor Agent Date: Tue, 19 May 2026 07:59:22 +0000 Subject: [PATCH] fix(close-low-quality-prs): report actual closes in dry-run summary IMMEDIATE_CLOSE_LOGINS PRs are closed even when the global --close flag is not set, but the summary used the global dry-run flag to choose between 'would close' and 'closed'. Split the count so operators can see both actual closures and dry-run would-be closures. Co-authored-by: Yassin Kortam --- .github/scripts/close_low_quality_prs.py | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/.github/scripts/close_low_quality_prs.py b/.github/scripts/close_low_quality_prs.py index c3416e48a9b..746807f4a58 100644 --- a/.github/scripts/close_low_quality_prs.py +++ b/.github/scripts/close_low_quality_prs.py @@ -623,7 +623,17 @@ def main() -> int: print("\n=== Summary ===") for key, value in summary.items(): print(f" {key:28s} {value}") - print(f"\nTotal {'would close' if dry_run else 'closed'}: {summary['close']}") + # `IMMEDIATE_CLOSE_LOGINS` PRs are closed even in global dry-run mode, so + # report actual closures alongside the dry-run "would close" count to avoid + # misleading operators into thinking no writes occurred. + would_close = summary["close"] - closed + if dry_run: + if closed: + print(f"\nTotal closed: {closed}; would close: {would_close}") + else: + print(f"\nTotal would close: {would_close}") + else: + print(f"\nTotal closed: {closed}") print( f"Total {'would warn (grace)' if dry_run else 'warned (grace)'}: " f"{summary['warn-grace']}"