v1.0.4 - #27
Conversation
…e-when-same-named-csx-exists-in-multiple-component-directories build updated
Reviewer's guide (collapsed on small PRs)Reviewer's GuideUpdates the build-and-publish GitHub Actions workflow to support npm OIDC trusted publishing, modernizes the Node.js runtime version, and simplifies the npm publish command access configuration. Flow diagram for updated build-and-publish workflow stepsflowchart TD
A["Trigger workflow (push/tag)"] --> B["Start job build-and-publish on ubuntu-latest"]
B --> C["Set job permissions: id-token write"]
C --> D["Setup Node.js 24 via actions/setup-node@v4"]
D --> E["Install dependencies and run checks"]
E --> F["Determine version and publish conditions"]
F --> G{Publish allowed?}
G -- No --> H["Exit without publishing"]
G -- Yes --> I["Run npm publish"]
I --> J["Package published to npm using OIDC trusted publishing"]
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
Summary of ChangesHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request updates the application's configuration to grant web fetching permissions for Highlights
🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. Ignored Files
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here. Footnotes
|
There was a problem hiding this comment.
Hey - I've found 1 issue, and left some high level feedback:
- Consider using an LTS or semver range for the Node version (e.g.
lts/*or20.x) rather than pinning to24, to reduce the chance of unexpected breakage when the workflow runs on environments that might not yet fully support Node 24. - Double-check that removing
--access publicfromnpm publishis compatible with your package scope and publish history, since scoped packages require--access publicon first publish to be publicly visible.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- Consider using an LTS or semver range for the Node version (e.g. `lts/*` or `20.x`) rather than pinning to `24`, to reduce the chance of unexpected breakage when the workflow runs on environments that might not yet fully support Node 24.
- Double-check that removing `--access public` from `npm publish` is compatible with your package scope and publish history, since scoped packages require `--access public` on first publish to be publicly visible.
## Individual Comments
### Comment 1
<location path=".github/workflows/build-and-publish.yml" line_range="37-38" />
<code_context>
build-and-publish:
runs-on: ubuntu-latest
+
+ permissions:
+ id-token: write # Required for OIDC Trusted Publishing to npm
outputs:
</code_context>
<issue_to_address>
**issue (bug_risk):** Job-level permissions may override and drop other required permissions like `contents: read`.
In GitHub Actions, job-level `permissions` override the workflow-level ones instead of merging. With only `id-token: write` set here, defaults like `contents: read` are dropped, which can break `actions/checkout` and any steps needing repo contents. Please either include the other required permissions in this block or remove it and add `id-token: write` to the top-level `permissions` instead.
</issue_to_address>Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
| permissions: | ||
| id-token: write # Required for OIDC Trusted Publishing to npm |
There was a problem hiding this comment.
issue (bug_risk): Job-level permissions may override and drop other required permissions like contents: read.
In GitHub Actions, job-level permissions override the workflow-level ones instead of merging. With only id-token: write set here, defaults like contents: read are dropped, which can break actions/checkout and any steps needing repo contents. Please either include the other required permissions in this block or remove it and add id-token: write to the top-level permissions instead.
There was a problem hiding this comment.
Code Review
This pull request updates the .claude/settings.json file to include WebFetch(domain:github.com) in the allowed permissions. Feedback suggests considering a more granular scope for this WebFetch permission, such as api.github.com or specific OIDC token endpoints, to adhere to the principle of least privilege and enhance security.
| "allow": [ | ||
| "WebFetch(domain:docs.npmjs.com)" | ||
| "WebFetch(domain:docs.npmjs.com)", | ||
| "WebFetch(domain:github.com)" |
There was a problem hiding this comment.
Consider narrowing the scope of the WebFetch permission for github.com. While necessary for OIDC trusted publishing, granting access to the entire github.com domain might be overly broad. If possible, specify a more granular domain or path (e.g., api.github.com or specific OIDC token endpoints) to adhere to the principle of least privilege and reduce potential attack surface.
Summary by Sourcery
Update the npm publish workflow to use Node.js 24 and support OIDC-based trusted publishing.
Build: