Use gh cli to collect the set of PRs that are labeled as needs_backport.
()
| 52 | |
| 53 | @functools.cache |
| 54 | def get_needs_backport_pr_numbers() -> tuple[int, ...]: |
| 55 | """Use gh cli to collect the set of PRs that are labeled as needs_backport.""" |
| 56 | result = run( |
| 57 | ["gh", "pr", "list", "--label", "needs backport", "--state", "closed"], |
| 58 | capture_output=True, |
| 59 | ) |
| 60 | lines = [line.split("\t", 1)[0] for line in result.stdout.splitlines()] |
| 61 | return tuple(sorted(int(line) for line in lines)) |
| 62 | |
| 63 | |
| 64 | @functools.cache |
no test coverage detected
searching dependent graphs…