Skip to content

Commit 3909e20

Browse files
potiukclaude
andcommitted
Add --max-num flag to breeze issues unassign command
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent abf98b5 commit 3909e20

File tree

4 files changed

+27
-12
lines changed

4 files changed

+27
-12
lines changed

dev/breeze/doc/images/output_issues_unassign.svg

Lines changed: 14 additions & 10 deletions
Loading
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
03b6c243f4fbc43abcdfc4e7f2dca76c
1+
acac77b3df954d6b8aff4d11fafedee6

dev/breeze/src/airflow_breeze/commands/issues_commands.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,13 +133,21 @@ def _process_batch(
133133
show_default=True,
134134
help="Number of flagged issues to accumulate before prompting.",
135135
)
136+
@click.option(
137+
"--max-num",
138+
type=int,
139+
default=0,
140+
show_default=True,
141+
help="Maximum number of issues to flag for unassignment. 0 means no limit.",
142+
)
136143
@option_dry_run
137144
@option_verbose
138145
@option_answer
139146
def unassign(
140147
github_token: str | None,
141148
github_repository: str,
142149
batch_size: int,
150+
max_num: int,
143151
):
144152
from github import Github
145153

@@ -175,6 +183,9 @@ def unassign(
175183
batch.append((issue, non_collab))
176184
total_flagged += 1
177185

186+
if max_num and total_flagged >= max_num:
187+
break
188+
178189
if len(batch) >= batch_size:
179190
total_unassigned += _process_batch(batch, dry_run)
180191
batch = []

dev/breeze/src/airflow_breeze/commands/issues_commands_config.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
},
3030
{
3131
"name": "Unassign options",
32-
"options": ["--batch-size"],
32+
"options": ["--batch-size", "--max-num"],
3333
},
3434
],
3535
}

0 commit comments

Comments
 (0)