Skip to content

fix: remove registry-url from setup-node to avoid conflicts with semantic-release#48

Open
codfish wants to merge 1 commit intomainfrom
feat/no-registry-url
Open

fix: remove registry-url from setup-node to avoid conflicts with semantic-release#48
codfish wants to merge 1 commit intomainfrom
feat/no-registry-url

Conversation

@codfish
Copy link
Owner

@codfish codfish commented Feb 8, 2026

Previously, registry-url was hardcoded to 'https://registry.npmjs.org/' which could conflict with semantic-release's npm authentication.

Changes:

  • Made registry-url an optional input parameter (defaults to not set)
  • When not provided, no .npmrc authentication is configured
  • Added comprehensive documentation on when to use (or not use) this parameter

Guidance:

  • Skip registry-url when using semantic-release (recommended)
  • Skip registry-url when only installing dependencies (most common use case)
  • Explicitly set registry-url when needed for manual npm publish workflows

See semantic-release docs for more context: https://semantic-release.gitbook.io/semantic-release/recipes/ci-configurations/github-actions#important-avoid-registry-url-in-setup-node

Summary by CodeRabbit

  • New Features

    • Added configurable registry-url input parameter for npm registry authentication setup
    • Enables dynamic registry URL configuration in place of hard-coded values
  • Documentation

    • Added registry URL configuration guidance with usage examples and recommended scenarios

@coderabbitai
Copy link

coderabbitai bot commented Feb 8, 2026

📝 Walkthrough

Walkthrough

The setup-node-and-install action now accepts a new optional registry-url input parameter that allows users to dynamically configure npm registry authentication URLs. The README documentation was expanded to describe when and how to use this parameter, and the action.yml file was updated to accept the input and apply it during the Node.js setup step.

Changes

Cohort / File(s) Summary
Documentation
setup-node-and-install/README.md
Added registry-url to the inputs table, introduced a new "Registry URL Configuration" section explaining use cases, when not to use the parameter, and provided YAML example.
Action Configuration
setup-node-and-install/action.yml
Added optional registry-url input with description; updated Setup Node.js step to dynamically use the input value instead of hardcoded registry URL.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

Poem

🐰 A registry parameter hops into view,
No more hardcoded paths—let users choose!
With npm credentials and auth so true,
This bunny approves of your workflow's new groove. ✨

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The PR title accurately describes the main change: making registry-url optional to avoid conflicts with semantic-release, which aligns with the changeset that adds registry-url as an optional input parameter.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feat/no-registry-url

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions
Copy link

github-actions bot commented Feb 8, 2026

🚀 Integration Test Results

npm-pr-version action test:

  • ✅ Version generation: 0.0.0-PR-48--ce21910
  • ✅ package.json update: Successful
  • ✅ Format validation: Passed

The action is working correctly! 🎉

Previously, registry-url was hardcoded to 'https://registry.npmjs.org/'
which could conflict with semantic-release's npm authentication.

Changes:
- Made registry-url an optional input parameter (defaults to not set)
- When not provided, no .npmrc authentication is configured
- Added comprehensive documentation on when to use (or not use) this parameter

This allows users to:
- Skip registry-url when using semantic-release (recommended)
- Skip registry-url when only installing dependencies (most common use case)
- Explicitly set registry-url when needed for manual npm publish workflows

See semantic-release docs for more context:
https://semantic-release.gitbook.io/semantic-release/recipes/ci-configurations/github-actions#important-avoid-registry-url-in-setup-node
@codfish codfish force-pushed the feat/no-registry-url branch from f2e248e to ce21910 Compare February 8, 2026 03:52
@codfish codfish marked this pull request as ready for review February 8, 2026 03:52
@github-actions
Copy link

github-actions bot commented Feb 8, 2026

Claude encountered an error —— View job


Code Review in Progress

  • Read repository instructions (AGENT.md)
  • Review changed files and git diff
  • Analyze code quality and best practices
  • Check for security implications
  • Review performance considerations
  • Evaluate testing coverage
  • Assess documentation quality
  • Provide comprehensive feedback

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Fix all issues with AI agents
In `@setup-node-and-install/README.md`:
- Line 93: The README row for `registry-url` is inside the auto-generated
section between the HTML markers <!-- start inputs --> and <!-- end inputs -->
and must not be manually edited; re-run the README generation tool that produces
docs from action.yml so the `registry-url` input (and its row) is regenerated
from action.yml instead of hand-editing the README, ensuring content between
those markers is only updated by the generator.

| `node-version` | Node.js version to install (e.g. "24", "lts/\*"). Precedence: node-version input > .node-version > .nvmrc > package.json volta.node. | No | - |
| `install-options` | Extra command-line options to pass to npm/pnpm/yarn install. | No | - |
| `working-directory` | Directory containing package.json and lockfile. | No | `.` |
| `registry-url` | Registry URL for npm authentication (e.g. "https://registry.npmjs.org/"). See [Registry URL Configuration](#registry-url-configuration) below. | No | - |
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

This line is inside auto-generated markers and may be overwritten.

Line 93 falls between <!-- start inputs --> and <!-- end inputs --> markers. Per coding guidelines, content between HTML comment markers is auto-generated and should not be manually edited. Ensure the auto-generation tool is run so this row is produced from action.yml rather than hand-edited here.

As per coding guidelines, "NEVER edit content between HTML comment markers in README files (doctoc markers, action docs markers, inputs/outputs markers). These indicate auto-generated content that will be overwritten."

🤖 Prompt for AI Agents
In `@setup-node-and-install/README.md` at line 93, The README row for
`registry-url` is inside the auto-generated section between the HTML markers
<!-- start inputs --> and <!-- end inputs --> and must not be manually edited;
re-run the README generation tool that produces docs from action.yml so the
`registry-url` input (and its row) is regenerated from action.yml instead of
hand-editing the README, ensuring content between those markers is only updated
by the generator.

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