Skip to content
New issue

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

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

Already on GitHub? # to your account

fix(config): set npmToken in npmrc when not in encrypted #31815

Merged
merged 8 commits into from
Nov 8, 2024

Conversation

RahulGautamSingh
Copy link
Collaborator

@RahulGautamSingh RahulGautamSingh commented Oct 7, 2024

Changes

Add npmToken value in the npmrc string even when the npmToken is not within encrypted object

Context

Closes: #31808

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 (locally, with npmToken within encrypted and without it )

Copy link
Member

@viceice viceice left a comment

Choose a reason for hiding this comment

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

I think the existing token handling should be removed then. 🤔

maybe it should be handled in npm manager only? because there's already some kind of code to handle 🤔

lib/workers/repository/init/merge.ts Outdated Show resolved Hide resolved
lib/workers/repository/init/merge.ts Show resolved Hide resolved
lib/workers/repository/init/merge.ts Outdated Show resolved Hide resolved
@RahulGautamSingh
Copy link
Collaborator Author

I think the existing token handling should be removed then.

Still needed for self-hosted users.

@viceice
Copy link
Member

viceice commented Oct 7, 2024

I think the existing token handling should be removed then.

Still needed for self-hosted users.

can't we unify that code? otherwise we risk unexpected behavior in future

@RahulGautamSingh
Copy link
Collaborator Author

RahulGautamSingh commented Oct 7, 2024

can't we unify that code? otherwise we risk unexpected behavior in future

Actually just removing the npmToken & npmrc logic from decryptConfig function and handling it using the newly created setNpmTokenToNpmrc function should work as well. Updating...

Copy link
Member

@viceice viceice left a comment

Choose a reason for hiding this comment

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

LGTM, but needs real repo testing

@RahulGautamSingh
Copy link
Collaborator Author

LGTM, but needs real repo testing

Done ✅

@viceice viceice added this pull request to the merge queue Nov 8, 2024
Merged via the queue into renovatebot:main with commit 2194c22 Nov 8, 2024
39 checks passed
@renovate-release
Copy link
Collaborator

🎉 This PR is included in version 39.7.6 🎉

The release is available on:

Your semantic-release bot 📦🚀

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Set npmToken value in npmrc string even when it is not withtin encrypted object
4 participants