Skip to content

chore: add github action to raise release RC PR#1429

Merged
onlyjackfrost merged 1 commit intomainfrom
chore/release-pr
Mar 19, 2025
Merged

chore: add github action to raise release RC PR#1429
onlyjackfrost merged 1 commit intomainfrom
chore/release-pr

Conversation

@onlyjackfrost
Copy link
Copy Markdown
Contributor

@onlyjackfrost onlyjackfrost commented Mar 19, 2025

add github action to raise release RC PR

  1. get the release_version, ui_version, ai_version, engine_version from github action input.
  2. checkout a branch name: "release/{{release_version}}"
  3. update file wren-launcher/utils/docker.go, update the WREN_PRODUCT_VERSION with the release_version input.
  4. update file docker/.env.example,
    update WREN_PRODUCT_VERSION with release_version
    update WREN_ENGINE_VERSION and IBIS_SERVER_VERSION with engine_version
    update WREN_AI_SERVICE_VERSION with ai_version
    update WREN_UI_VERSION with ui_version
  5. commit these changes with message "release {{release_version}}"
  6. push to remote and raise PR with title "Release {{release_version}}", description should be the same as title.

Summary by CodeRabbit

  • New Features
    • Introduced an automated workflow for creating release candidate pull requests via manual triggers.
    • Ensured consistent and streamlined version updates across the product for more reliable release management.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Mar 19, 2025

Walkthrough

A new GitHub Actions workflow file, release-rc-pr.yaml, has been added to automate the creation of release candidate pull requests. When manually triggered via the workflow_dispatch event, it accepts several version inputs and executes a series of steps: repository checkout, Git identity setup, branch creation, automated version updates in specific files using sed and grep, committing and pushing the changes, and finally, creating a pull request against the main branch using the peter-evans/create-pull-request action.

Changes

Files Change Summary
.github/workflows/release-rc-pr.yaml New GitHub Actions workflow to automate the release candidate PR creation process, including branch creation and PR generation.
wren-launcher/utils/docker.go, docker/.env.example Automated update of version variables (WREN_PRODUCT_VERSION, WREN_ENGINE_VERSION, IBIS_SERVER_VERSION, WREN_AI_SERVICE_VERSION, WREN_UI_VERSION) using sed with verification via grep.

Sequence Diagram(s)

sequenceDiagram
    participant U as User
    participant GH as GitHub Actions
    participant R as Repository
    participant V as Version Files
    participant PR as Pull Request

    U->>GH: Trigger workflow_dispatch with version inputs
    GH->>R: Checkout repository
    GH->>R: Set up Git identity
    GH->>R: Create new branch based on release version
    GH->>V: Update version variables in docker.go and .env.example
    GH->>R: Commit and push changes
    GH->>PR: Create pull request targeting main branch
Loading

Possibly related PRs

  • release 0.15.2 #1240: Introduces workflow changes affecting WREN_PRODUCT_VERSION in both docker.go and .env.example, similar to the current PR.
  • release 0.15.0 #1229: Modifies the WREN_PRODUCT_VERSION in docker.go, showing a direct link with the automated updates in this PR.
  • release 0.15.4-rc.1 #1357: Updates multiple version variables in the same files as this PR, indicating a strong code-level relationship.

Suggested reviewers

  • wwwy3y3

Poem

I’m a rabbit hopping through lines of code,
Skipping through branches down a winding road.
With each version update, my heart beats fast,
Pull requests bloom like flowers vast.
Code changes fixed, fresh as morning dew,
I celebrate with a joyful "boing-boing" too!
🐇💻 Hop on, let’s code anew!

Tip

⚡🧪 Multi-step agentic review comment chat (experimental)
  • We're introducing multi-step agentic chat in review comments. This experimental feature enhances review discussions with the CodeRabbit agentic chat by enabling advanced interactions, including the ability to create pull requests directly from comments.
    - To enable this feature, set early_access to true under in the settings.

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

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.

Copy link
Copy Markdown
Contributor

@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

🧹 Nitpick comments (3)
.github/workflows/release-rc-pr.yaml (3)

23-25: Checkout Action Version Update:
The checkout step uses actions/checkout@v3. However, static analysis hints recommend updating this action to a more recent version as the runner might be considered outdated. Consider upgrading to a later stable version (e.g., actions/checkout@v4) to benefit from the latest improvements.

Proposed diff:

-        uses: actions/checkout@v3
+        uses: actions/checkout@v4
🧰 Tools
🪛 actionlint (1.7.4)

24-24: the runner of "actions/checkout@v3" action is too old to run on GitHub Actions. update the action's version to fix this issue

(action)


37-46: Updating docker.go:
The sed command attempts to replace the WREN_PRODUCT_VERSION string with the new release version. The regex pattern appears well-crafted for a typical Go file declaration. A minor suggestion: confirm that the file formatting (e.g., use of tab characters) matches the assumptions in the sed command so the substitution is robust against formatting variations.


70-79: Pull Request Creation & Action Version Update:
The workflow uses peter-evans/create-pull-request@v5 to automatically create a PR. Similar to the checkout step, static analysis hints indicate that this action's version may be outdated. It is advisable to update to a newer version (e.g., peter-evans/create-pull-request@v6) to ensure compatibility and take advantage of recent updates.

Proposed diff:

-        uses: peter-evans/create-pull-request@v5
+        uses: peter-evans/create-pull-request@v6

The inputs provided to the action (token, commit message, branch, base, title, body, and draft flag) are clear and consistent with the PR objectives.

🧰 Tools
🪛 actionlint (1.7.4)

71-71: the runner of "peter-evans/create-pull-request@v5" action is too old to run on GitHub Actions. update the action's version to fix this issue

(action)

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 6390938 and 1654605.

📒 Files selected for processing (1)
  • .github/workflows/release-rc-pr.yaml (1 hunks)
🧰 Additional context used
🪛 actionlint (1.7.4)
.github/workflows/release-rc-pr.yaml

24-24: the runner of "actions/checkout@v3" action is too old to run on GitHub Actions. update the action's version to fix this issue

(action)


71-71: the runner of "peter-evans/create-pull-request@v5" action is too old to run on GitHub Actions. update the action's version to fix this issue

(action)

🔇 Additional comments (8)
.github/workflows/release-rc-pr.yaml (8)

1-2: Workflow Name & File Overview:
The workflow name "Create Release RC" clearly describes the purpose of the automation. The file is structured well as a GitHub Actions YAML and follows the expected conventions for defining manual triggers via workflow_dispatch.


3-17: Input Definitions Clarity:
The inputs for release_version, ui_version, ai_version, and engine_version are clearly defined with descriptive messages and marked as required. This makes the workflow self-documenting and easy to use.


19-22: Job & Runner Configuration:
The job create-release-pr is set to run on ubuntu-latest, which is standard and appropriate for this kind of automation.


26-30: Git Identity Setup:
The Git identity is configured correctly with a bot username (wren-ai[bot]) and a designated email. This ensures that automated commits are properly attributed.


31-36: Branch Creation Step:
The branch creation script constructs a branch name using the provided release_version input, checks out the new branch, and exports it via the GITHUB_ENV. This approach is clear and effective.


47-60: Updating .env.example:
The workflow updates multiple environment variables using sed. Each substitution cleanly replaces the entire line for the respective version variables. The subsequent grep helps verify the changes. Ensure that the patterns in the .env.example file consistently match these regex substitutions.


61-65: Committing Changes:
The commit step stages the two modified files and creates a commit with a clear message that includes the release version. This is a straightforward and effective commit operation.


66-69: Pushing the Branch:
Pushing the branch using the environment variable set in the previous steps is correctly implemented. The use of --set-upstream ensures that tracking is properly established.

@onlyjackfrost onlyjackfrost merged commit cd82f9f into main Mar 19, 2025
5 checks passed
@onlyjackfrost onlyjackfrost deleted the chore/release-pr branch March 19, 2025 10:47
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