Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(gomod): rename depName #30030

Merged
merged 7 commits into from
Jul 20, 2024
Merged

Conversation

jamietanna
Copy link
Contributor

Changes

Rename the depName variable, as in #29575 we will be adding replacements for gomod and so
we'll have both a fromPackageName and a toPackageName.

Context

As part of a prefactor for #29575, we should make this change
independently, to make the changes in #29575 easier to review.

This is required as we will be adding replacements for gomod and so
we'll have both a fromPackageName and a toPackageName.

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

As part of a prefactor for renovatebot#29575, we should make this change
independently, to make the changes in renovatebot#29575 easier to review.

This is required as we will be adding replacements for `gomod` and so
we'll have both a `fromPackageName` and a `toPackageName`.
@jamietanna jamietanna marked this pull request as ready for review July 4, 2024 09:55
@jamietanna jamietanna requested a review from rarkins July 4, 2024 13:13
viceice
viceice previously approved these changes Jul 4, 2024
@jamietanna
Copy link
Contributor Author

Closing, as keeping the name as depName + using a let instead of a const allows #29575 to be simpler - still happy to pull any other changes out of that PR if we'd like to, but I think this PR as-is isn't needed

@jamietanna jamietanna closed this Jul 8, 2024
@jamietanna jamietanna reopened this Jul 8, 2024
@jamietanna
Copy link
Contributor Author

jamietanna commented Jul 8, 2024

I've re-opened as it appears that yes actually we do need to have the renaming of variables, as we do some pre-emptive checks i.e. https://github.com/jamietanna/renovate/blob/33a20bcc2a8ad9b35d63d1e99530eac776778bdc/lib/modules/manager/gomod/update.ts#L45 to make sure that the dependency is there, and if we reuse the depName then those checks will fail, and we end up not updating anything

@jamietanna
Copy link
Contributor Author

Thank you! 🙇

@rarkins rarkins added this pull request to the merge queue Jul 20, 2024
Merged via the queue into renovatebot:main with commit 50191de Jul 20, 2024
38 checks passed
@renovate-release
Copy link
Collaborator

🎉 This issue has been resolved in version 37.436.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@jamietanna jamietanna deleted the refactor/gomod branch July 20, 2024 11:53
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 20, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants