Return True when this PR's squash marker is already on the branch.
(clone: Path, upstream_tag: str, pr: PatchPr)
| 247 | |
| 248 | |
| 249 | def already_squashed(clone: Path, upstream_tag: str, pr: PatchPr) -> bool: |
| 250 | """Return True when this PR's squash marker is already on the branch.""" |
| 251 | log = git(clone, "log", "--format=%s", f"{upstream_tag}..HEAD", check=False) |
| 252 | needle = squash_marker(pr) |
| 253 | return any(line.startswith(needle) for line in log.splitlines()) |
| 254 | |
| 255 | |
| 256 | def non_merge_commits(clone: Path, commits: tuple[str, ...]) -> list[str]: |
no test coverage detected