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

Add setting for always-auth #48

Merged
merged 2 commits into from
Sep 3, 2019
Merged

Add setting for always-auth #48

merged 2 commits into from
Sep 3, 2019

Conversation

DavidJFelix
Copy link
Contributor

- https://docs.npmjs.com/misc/config#always-auth
- Allow private repos for stuff like artifactory to work
@DavidJFelix
Copy link
Contributor Author

A little background:

JFrog Artifactory (Cloud) wants always-auth=true for both yarn and npm for private repos.
I ran into this issue where auth'd setups would 401 until I made this change.

Copy link
Contributor

@damccorm damccorm left a comment

Choose a reason for hiding this comment

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

This looks like a good change to me - would you mind adding a test in https://github.com/actions/setup-node/blob/master/__tests__/authutil.test.ts? Also, I'm pretty sure this will break some existing tests, could you update those as well?

src/authutil.ts Outdated Show resolved Hide resolved
@@ -2,6 +2,9 @@ name: 'Setup Node.js environment'
description: 'Setup a Node.js environment and add it to the PATH, additionally providing proxy support'
author: 'GitHub'
inputs:
always-auth:
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit - this should go after scope in the parameter ordering. That way its grouped with the other auth parameters and comes after registry-url which is required in all auth cases.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Counter nit: Opinion: At the top it leaves the map in alphabetical order.

@DavidJFelix
Copy link
Contributor Author

I'll make changes as requested. Give me a bit to execute them. I left some justifications in case you're feeling like being persuaded by an internet stranger.

@DavidJFelix
Copy link
Contributor Author

You should see the changes as requested in the most recent commit. Let me know if you want me to rebase them.

Copy link
Contributor

@damccorm damccorm left a comment

Choose a reason for hiding this comment

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

Looks good, thanks for the contribution!

@damccorm damccorm merged commit 7a3ce83 into actions:master Sep 3, 2019
krzyk pushed a commit to krzyk/setup-node that referenced this pull request Apr 11, 2023
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.

2 participants