Skip to content

fix: run renovate-deps for deleted tracked files#247

Merged
zeitlinger merged 3 commits intomainfrom
codex/renovate-deletion
Apr 30, 2026
Merged

fix: run renovate-deps for deleted tracked files#247
zeitlinger merged 3 commits intomainfrom
codex/renovate-deletion

Conversation

@zeitlinger
Copy link
Copy Markdown
Member

@zeitlinger zeitlinger commented Apr 28, 2026

Blocked by #253

Summary

Fixes adaptive renovate-deps relevance when the only relevant change is deleting a file that is still tracked in .github/renovate-tracked-deps.json.

The changed-path collection now preserves deleted paths, and renovate-deps uses the raw changed path list for relevance instead of only existing files.

Validation

  • cargo fmt -- --check
  • git diff --check
  • cargo test renovate_deps
  • FLINT_CASES=renovate-deps/fast-only cargo test cases

Note: FLINT_CASES=renovate-deps cargo test cases was attempted, but non-fake renovate fixtures need renovate installed on PATH.

@zeitlinger zeitlinger marked this pull request as ready for review April 28, 2026 16:59
@zeitlinger zeitlinger requested a review from a team as a code owner April 28, 2026 16:59
Copilot AI review requested due to automatic review settings April 28, 2026 16:59
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes renovate-deps relevance detection when the only relevant change is the deletion of a file that remains referenced in .github/renovate-tracked-deps.json, ensuring the linter still runs in --fast-only mode.

Changes:

  • Preserve deleted paths in git changed-path collection by no longer filtering deletions out of git diff --name-only.
  • Update renovate-deps relevance logic to use the raw changed-path list (including deletions) and normalize path separators.
  • Add unit + Unix e2e coverage to validate renovate-deps runs when a tracked manifest is deleted.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
tests/e2e.rs Adds a Unix-only e2e test ensuring renovate-deps runs when a tracked manifest (package.json) is deleted.
src/linters/renovate_deps.rs Switches relevance to use changed_paths (supporting deletions) and introduces path normalization; adds unit test for deleted tracked manifest relevance.
src/files.rs Stops excluding deleted files from git diff --name-only results so deleted paths are preserved in changed_paths.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/linters/renovate_deps.rs
Signed-off-by: Gregor Zeitlinger <gregor.zeitlinger@grafana.com>
Signed-off-by: Gregor Zeitlinger <gregor.zeitlinger@grafana.com>
Signed-off-by: Gregor Zeitlinger <gregor.zeitlinger@grafana.com>
@zeitlinger zeitlinger force-pushed the codex/renovate-deletion branch from 997024a to a4620d4 Compare April 30, 2026 13:05
@zeitlinger zeitlinger enabled auto-merge (squash) April 30, 2026 13:10
@zeitlinger zeitlinger merged commit 9ac7302 into main Apr 30, 2026
13 checks passed
@zeitlinger zeitlinger deleted the codex/renovate-deletion branch April 30, 2026 13:15
This was referenced May 8, 2026
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.

3 participants