Skip to content

chore: npm publish fix for github runner#320

Merged
rhamzeh merged 4 commits into
mainfrom
chore/sudo-npm-install
Feb 10, 2026
Merged

chore: npm publish fix for github runner#320
rhamzeh merged 4 commits into
mainfrom
chore/sudo-npm-install

Conversation

@SoulPancake

@SoulPancake SoulPancake commented Feb 10, 2026

Copy link
Copy Markdown
Member

Description

What problem is being solved?

How is it being solved?

What changes are made to solve it?

References

Review Checklist

  • I have clicked on "allow edits by maintainers".
  • I have added documentation for new/changed functionality in this PR or in a PR to openfga.dev [Provide a link to any relevant PRs in the references section above]
  • The correct base branch is being used, if not main
  • I have added tests to validate that the change in functionality is working as expected

Summary by CodeRabbit

  • Chores
    • Updated build process configuration to use elevated privileges for dependency installation.

Note: This release contains no user-facing changes.

@SoulPancake
SoulPancake requested a review from a team as a code owner February 10, 2026 14:44
Copilot AI review requested due to automatic review settings February 10, 2026 14:44
@dosubot

dosubot Bot commented Feb 10, 2026

Copy link
Copy Markdown

Related Documentation

Checked 7 published document(s) in 1 knowledge base(s). No updates required.

How did I do? Any feedback?  Join Discord

@coderabbitai

coderabbitai Bot commented Feb 10, 2026

Copy link
Copy Markdown

Walkthrough

Modified GitHub Actions workflow to run npm install command with elevated privileges by adding a sudo prefix to the global npm update step.

Changes

Cohort / File(s) Summary
CI/CD Configuration
.github/workflows/main.yaml
Added sudo prefix to npm install command for privilege elevation.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

🚥 Pre-merge checks | ✅ 2 | ❌ 1
❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Title check ⚠️ Warning The PR title states 'chore: npm publish fix for github runner' but the actual change only adds sudo to an npm install command in a workflow file, which is not about publishing. Update the title to accurately reflect the change, such as 'chore: add sudo prefix to npm install step in github workflow' or similar.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
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 docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch chore/sudo-npm-install

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.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
.github/workflows/main.yaml (1)

107-114: ⚠️ Potential issue | 🟠 Major

Pre-existing bug: env.NODE_VERSION is undefined — should be env.TARGET_NODE_VERSION.

Line 110 references ${{ env.NODE_VERSION }} but the workflow defines TARGET_NODE_VERSION on line 13. This means the publish job's setup-node step receives an empty node version, which may cause it to fall back to a default or fail. This is not introduced by this PR but is in the same job being modified.

Proposed fix
       - name: Set up node
         uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0
         with:
-          node-version: ${{ env.NODE_VERSION }}
+          node-version: ${{ env.TARGET_NODE_VERSION }}
           registry-url: "https://registry.npmjs.org"

@codecov-commenter

codecov-commenter commented Feb 10, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 89.55%. Comparing base (b74ce11) to head (6245cad).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #320   +/-   ##
=======================================
  Coverage   89.55%   89.55%           
=======================================
  Files          25       25           
  Lines        1475     1475           
  Branches      254      277   +23     
=======================================
  Hits         1321     1321           
  Misses         93       93           
  Partials       61       61           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR updates the release workflow to run the “ensure latest npm is installed” step with elevated privileges during the publish job.

Changes:

  • Switch npm install -g npm@latest to sudo npm install -g npm@latest in the publish workflow step.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread .github/workflows/main.yaml Outdated
@SoulPancake
SoulPancake marked this pull request as draft February 10, 2026 14:52
@SoulPancake
SoulPancake marked this pull request as ready for review February 10, 2026 14:59
Comment thread .github/workflows/main.yaml Outdated
@SoulPancake
SoulPancake requested a review from rhamzeh February 10, 2026 15:40
@SoulPancake SoulPancake changed the title chore: sudo install for github runner chore: npm publish fix for github runner Feb 10, 2026
@rhamzeh
rhamzeh added this pull request to the merge queue Feb 10, 2026
Merged via the queue into main with commit e995666 Feb 10, 2026
26 checks passed
@rhamzeh
rhamzeh deleted the chore/sudo-npm-install branch February 10, 2026 16:23
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.

4 participants