fix(autoreplace): handle digest-only update without replaceString by RahulGautamSingh · Pull Request #42840 · renovatebot/renovate · GitHub
Skip to content

fix(autoreplace): handle digest-only update without replaceString#42840

Draft
RahulGautamSingh wants to merge 1 commit intorenovatebot:mainfrom
RahulGautamSingh:fix/autoreplace-digest-only-update
Draft

fix(autoreplace): handle digest-only update without replaceString#42840
RahulGautamSingh wants to merge 1 commit intorenovatebot:mainfrom
RahulGautamSingh:fix/autoreplace-digest-only-update

Conversation

@RahulGautamSingh
Copy link
Copy Markdown
Collaborator

Changes

Pick the fallback replaceString based on which field is actually changing:

  • digest-only updates anchor on currentDigest
  • value-only updates anchor on currentValue
  • updates where both value and digest change fall through to the per-field replacement path

Replaces the changedCount > 1 heuristic from #38308, which missed the digest-only case when currentValue is also captured. The old heuristic also had to special-case currentDigestShort to avoid a bazel regression (#38252); switching to a semantic check makes that special case unnecessary.

Fixes the shape reported in discussion #36967 and #36461 — jsonata custom managers where currentValue and currentDigest live in separate tokens and only the digest needs updating.

Context

Please select one of the following:

  • This closes an existing Issue, Closes: #
  • This doesn't close an Issue, but I accept the risk that this PR may be closed if maintainers disagree with its opening or implementation

AI assistance disclosure

Did you use AI tools to create any part of this pull request?

Please select one option and, if yes, briefly describe how AI was used (e.g., code, tests, docs) and which tool(s) you used.

  • No — I did not use AI for this contribution.
  • Yes — minimal assistance (e.g., IDE autocomplete, small code completions, grammar fixes).
  • Yes — substantive assistance (AI-generated non‑trivial portions of code, tests, or documentation).
  • Yes — other (please describe):

Documentation (please check one with an [x])

  • I have updated the documentation, or
  • No documentation update is required

How I've tested my work (please select one)

I have verified these changes via:

  • Code inspection only, or
  • Newly added/modified unit tests, or
  • No unit tests, but ran on a real repository, or
  • Both unit tests + ran on a real repository

The public repository:

@github-actions github-actions Bot requested a review from viceice April 23, 2026 11:08
@RahulGautamSingh RahulGautamSingh marked this pull request as draft April 23, 2026 11:11
@github-actions github-actions Bot removed the request for review from viceice April 23, 2026 11:11
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