Skip to content

[v3] Fix npm ci - #4101

Merged
leaanthony merged 2 commits into
wailsapp:v3-alphafrom
fbbdev:v3-alpha-bugfix/publish-ci-versioning
Feb 27, 2025
Merged

leaanthony merged 2 commits into
wailsapp:v3-alphafrom
fbbdev:v3-alpha-bugfix/publish-ci-versioning

Conversation

@fbbdev

@fbbdev fbbdev commented Feb 27, 2025 •

Copy link
Copy Markdown
Contributor

Quick fix for the npm ci publishing random updates.

Summary by CodeRabbit

  • Chores
    • Updated the automated release process by renaming and refining steps related to version updates. The process now directly employs a command to bump the prerelease version.
    • Removed legacy routines responsible for automatically managing version updates in the package manifest, streamlining the release operations.

@coderabbitai

coderabbitai Bot commented Feb 27, 2025 •

Copy link
Copy Markdown
Contributor

Warning

Rate limit exceeded

@fbbdev has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 12 minutes and 7 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

📥 Commits

Reviewing files that changed from the base of the PR and between cff052c and 30f0ec4.

⛔ Files ignored due to path filters (1)
  • v3/tasks/events/go.sum is excluded by !**/*.sum
📒 Files selected for processing (3)
  • .github/workflows/publish-npm.yml (1 hunks)
  • v3/tasks/events/generate.go (0 hunks)
  • v3/tasks/events/go.mod (1 hunks)

Walkthrough

The changes update the version bumping procedure in the CI workflow and remove manual version management from the application code. In the GitHub Actions workflow, the version bump step has been renamed and its identifier updated. It now executes a command (npm version prerelease) directly instead of relying on an external action, with the commit message adjusted accordingly. Additionally, the Go code responsible for reading, modifying, and writing the package version has been removed, including its associated imports and error handling.

Changes

File Change Summary
.github/workflows/publish-npm.yml Renamed the step from "test action" to "Bump version", updated its identifier from get-version to bump-version, replaced the external action with a command (npm version prerelease), and updated the commit message reference.
v3/tasks/events/generate.go Removed the package.json version management code including reading/parsing the current version, using the semver, gjson, and sjson libraries, and the associated error handling.

Sequence Diagram(s)

sequenceDiagram
    participant U as User/Trigger
    participant CI as CI Workflow
    participant BV as Bump Version Step
    participant Repo as Git Repository

    U->>CI: Trigger workflow
    CI->>BV: Execute version bump command (npm version prerelease)
    BV-->>CI: Return new version output
    CI->>Repo: Commit changes with new version information
Loading

Suggested reviewers

  • leaanthony

Poem

Hoppin' through the code, I lead the way,
A bunny's tweak makes the CI play.
Versions leap with a simple command,
Bugs and old scripts vanish from the land.
With whiskers twitching in digital cheer,
I code with joy—let's give a hearty cheer!
🐰✨


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@coderabbitai coderabbitai Bot 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.

Actionable comments posted: 0

🧹 Nitpick comments (2)
.github/workflows/publish-npm.yml (2)

44-48: Bump Version Step: Verify npm version prerelease Behavior
The new step directly runs npm version prerelease to bump the version and capture its output via the GitHub Actions output mechanism. Please verify that this command behaves as intended in your project environment. By default, npm version automatically creates a commit and tags the new version, which may conflict with the subsequent commit step. If you intend to control the commit process manually, consider appending the --no-git-tag-version flag to disable npm’s automatic commit and tag creation.


53-55: Commit Message Update: Confirm Redundancy and Commit Flow
The commit message now correctly references ${{ steps.bump-version.outputs.version }}. However, note that if npm version prerelease is performing its own commit (its default behavior), the extra commit within this step might be redundant or could even lead to an unexpected commit history. Ensure that the commit workflow aligns with your intended version bump process—either rely on npm’s built-in commit/tag behavior or disable it with --no-git-tag-version and use your custom commit message consistently.

📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 28d22f7 and cff052c.

📒 Files selected for processing (2)
  • .github/workflows/publish-npm.yml (1 hunks)
  • v3/tasks/events/generate.go (0 hunks)
💤 Files with no reviewable changes (1)
  • v3/tasks/events/generate.go
⏰ Context from checks skipped due to timeout of 90000ms (3)
  • GitHub Check: Run Go Tests (ubuntu-latest, 1.24)
  • GitHub Check: Run Go Tests (macos-latest, 1.24)
  • GitHub Check: Run Go Tests (windows-latest, 1.24)

@fbbdev
fbbdev force-pushed the v3-alpha-bugfix/publish-ci-versioning branch from cff052c to 0a0592a Compare February 27, 2025 11:01
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