Return True if the given commit modifies any file under changelog/unreleased/.
(sha, git_root)
| 79 | |
| 80 | |
| 81 | def commit_touches_unreleased(sha, git_root): |
| 82 | """Return True if the given commit modifies any file under changelog/unreleased/.""" |
| 83 | r = subprocess.run( |
| 84 | ["git", "diff-tree", "--no-commit-id", "-r", "--name-only", sha], |
| 85 | cwd=git_root, capture_output=True, text=True, check=True, |
| 86 | ) |
| 87 | return any(f.startswith("changelog/unreleased/") for f in r.stdout.splitlines()) |
| 88 | |
| 89 | |
| 90 | def strip_unreleased_block(changelog_path: Path, dry_run=False): |
no test coverage detected
searching dependent graphs…