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

chore: enable auto release on 3.x #5372

Merged
merged 1 commit into from
Dec 2, 2024
Merged

chore: enable auto release on 3.x #5372

merged 1 commit into from
Dec 2, 2024

Conversation

fengmk2
Copy link
Member

@fengmk2 fengmk2 commented Dec 2, 2024

Summary by CodeRabbit

Release Notes

  • New Features

    • Introduced a new GitHub Actions workflow for releases on the 3.x branch.
  • Improvements

    • Updated test coverage badges in both English and Chinese README files to reflect the 3.x branch.
  • Chores

    • Adjusted the tagging strategy in the package configuration to mark future releases as "latest" instead of "release-3.x".

Copy link

coderabbitai bot commented Dec 2, 2024

Walkthrough

The pull request introduces several changes primarily focused on the GitHub Actions workflows and documentation for the Egg.js project. The CodeQL analysis workflow is updated to trigger on the 3.x branch. A new workflow for releasing versions on the 3.x branch is added. Additionally, the README files are updated to reflect a new test coverage badge that points specifically to the 3.x branch. The package.json file is modified to change the publish tag from "release-3.x" to "latest".

Changes

File Change Summary
.github/workflows/codeql-analysis.yml Updated branches array to include 3.x for CodeQL analysis trigger.
.github/workflows/release-3.x.yml Added new workflow for 3.x branch, utilizing reusable workflow for releases.
README.md Updated test coverage badge to point to 3.x branch coverage.
README.zh-CN.md Updated test coverage badge to point to 3.x branch coverage in Chinese README.
package.json Changed publishConfig.tag from "release-3.x" to "latest".

Possibly related PRs

  • [docs: Update socketio.zh-CN.md #5353] The changes in the main PR involve updates to workflows related to the 3.x branch, while the retrieved PR focuses on documentation updates for socketio.zh-CN.md, which does not relate to the workflow changes in the main PR.

🐰 In the meadow, we hop and play,
With workflows updated, it's a bright new day!
The badges now shine for 3.x so clear,
With releases to come, let's all give a cheer!
From latest we publish, our joy will not cease,
In the world of code, we find our peace! 🌼


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 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.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

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.

@fengmk2
Copy link
Member Author

fengmk2 commented Dec 2, 2024

@coderabbitai review

Copy link

coderabbitai bot commented Dec 2, 2024

✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

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: 0

🧹 Outside diff range and nitpick comments (1)
package.json (1)

4-7: Consider adding release notes in package.json

Since this is a significant change in the package distribution strategy, consider adding a note field in the publishConfig to document this change for future reference.

 "publishConfig": {
   "tag": "latest",
-  "access": "public"
+  "access": "public",
+  "note": "Changed from release-3.x to latest tag on <DATE> for auto-release workflow"
 },
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Reviewing files that changed from the base of the PR and between 8624301 and b0766ff.

📒 Files selected for processing (5)
  • .github/workflows/codeql-analysis.yml (1 hunks)
  • .github/workflows/release-3.x.yml (1 hunks)
  • README.md (1 hunks)
  • README.zh-CN.md (1 hunks)
  • package.json (1 hunks)
✅ Files skipped from review due to trivial changes (3)
  • .github/workflows/release-3.x.yml
  • README.md
  • README.zh-CN.md
🔇 Additional comments (4)
.github/workflows/codeql-analysis.yml (2)

16-16: LGTM! Good security practice.

Adding CodeQL analysis for the 3.x branch ensures consistent security scanning across all active development branches.


16-16: Verify branch protection rules for 3.x

Ensure that branch protection rules for the 3.x branch require CodeQL checks to pass before merging.

package.json (2)

5-5: Verify the implications of changing the npm publish tag

Changing the publish tag from "release-3.x" to "latest" means that version 3.x will become the default version when users run npm install egg. Please ensure that:

  1. This change aligns with the project's versioning strategy
  2. Users are properly notified about this change
  3. Documentation is updated to reflect this change

Let's verify the current npm tags and versions:

✅ Verification successful

Changing the publish tag to "latest" is already aligned with current npm configuration

The verification shows that version 3.29.0 is already tagged as "latest" in the npm registry, which means this change in package.json is actually synchronizing the configuration with the current state. The npm tags show:

  • latest: '3.29.0'
  • Beta version 4.0.0-beta.0 is properly tagged as beta
  • Older major versions (1.x, 2.x) are properly tagged with latest-1 and latest-2

This change is safe and follows proper semantic versioning practices.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Check current npm tags and recent versions to understand the impact

# Get current npm dist-tags
npm view egg dist-tags

# Get recent versions and their publish dates
npm view egg versions --json | jq -r '.[-10:]'

Length of output: 315


2-2: Verify version management strategy

The current version is 3.29.0. With the new auto-release workflow and latest tag, ensure that:

  1. The version bump automation is properly configured
  2. The version follows semantic versioning
  3. The auto-release workflow correctly updates this version

Let's check the version management setup:

Copy link

codecov bot commented Dec 2, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 99.69%. Comparing base (8624301) to head (b0766ff).
Report is 1 commits behind head on 3.x.

Additional details and impacted files
@@           Coverage Diff           @@
##              3.x    #5372   +/-   ##
=======================================
  Coverage   99.69%   99.69%           
=======================================
  Files          35       35           
  Lines        3583     3583           
  Branches      528      528           
=======================================
  Hits         3572     3572           
  Misses         11       11           

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

@fengmk2 fengmk2 merged commit 682950f into 3.x Dec 2, 2024
26 checks passed
@fengmk2 fengmk2 deleted the auto-release-on-3.x branch December 2, 2024 05:53
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