Skip to content

Treat renamed files as modified#350

Merged
orgoro merged 1 commit intomainfrom
fix-renamed-files
Apr 30, 2026
Merged

Treat renamed files as modified#350
orgoro merged 1 commit intomainfrom
fix-renamed-files

Conversation

@orgoro
Copy link
Copy Markdown
Owner

@orgoro orgoro commented Apr 30, 2026

Summary

  • compareCommits was only counting files with status added or modified. The GitHub compare API also returns renamed for git rename detection — those files were silently dropped, so refactor PRs that rename files lost coverage tracking on them.
  • One-line fix: also accept 'renamed' into modifiedFiles.

Picks up the change originally proposed by @mangunowsky in #325. Their PR's dist/ was 8 months stale, so this is a fresh cut against main post-v3.3 with the same source change and Co-Authored-By credit.

Test plan

  • npm run all passes (build + lint + package + tests, 5/5)
  • CI build job passes on this PR
  • CI test job (uses: ./ self-test) still posts a coverage comment

🤖 Generated with Claude Code

The compareCommits API returns files with status 'renamed' for git
renames (rename detection on by default). These were silently dropped
from the modifiedFiles list, so refactor PRs that rename files lost
coverage tracking on those files.

Co-Authored-By: mangunowsky <mangunowsky@users.noreply.github.com>
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@github-actions
Copy link
Copy Markdown

☂️ Code Coverage

current status: ✅

Overall Coverage

Statements Covered Coverage Threshold Status
1000 940 94% 0% 🟢

New Files

No new covered files...

Modified Files

File Coverage Status
src/compareCommits.ts 88% 🟢
TOTAL 88% 🟢

updated for commit: 3892a09 by action🐍

@orgoro orgoro merged commit ca0c362 into main Apr 30, 2026
2 checks passed
@orgoro orgoro deleted the fix-renamed-files branch April 30, 2026 13:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant