Skip to content

Conversation

xsahil03x
Copy link
Member

@xsahil03x xsahil03x commented Jun 2, 2025

Summary by CodeRabbit

  • Introduced automated workflows for GitHub releases and publishing packages to pub.dev.
  • Updated and streamlined scripts for linting and publishing packages in the project workspace.

Copy link
Contributor

coderabbitai bot commented Jun 2, 2025

Warning

Rate limit exceeded

@xsahil03x has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 12 minutes and 4 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 13d655c and 8f60730.

📒 Files selected for processing (3)
  • .github/workflows/release_github.yml (1 hunks)
  • .github/workflows/release_pub.yml (1 hunks)
  • melos.yaml (2 hunks)

Walkthrough

Two new GitHub Actions workflows are introduced for automated releases: one triggers on commit messages to create GitHub releases, and another automates publishing Dart/Flutter packages to pub.dev using Melos. The melos.yaml file is updated to refine the linting script and add a new script for force publishing packages.

Changes

File(s) Change Summary
.github/workflows/release_github.yml Added workflow to automate GitHub releases triggered by commit messages with version tags on master branch.
.github/workflows/release_pub.yml Added workflow to automate Dart/Flutter package publishing to pub.dev, triggered on release or manual dispatch.
melos.yaml Updated lint:pub script for single concurrency dry-run publish; added release:pub script for force publish.
packages/stream_chat*/pubspec.yaml (all 6 packages) Incremented version numbers from 9.10.0 to 9.10.1 without other changes.

Sequence Diagram(s)

sequenceDiagram
    participant Developer
    participant GitHub
    participant GitHub Actions
    participant Pub.dev

    Developer->>GitHub: Push commit to master (with release message)
    GitHub->>GitHub Actions: Trigger release_github workflow
    GitHub Actions->>GitHub Actions: Extract version from commit message
    GitHub Actions->>GitHub: Create GitHub release

    Developer->>GitHub: Publish release or trigger workflow dispatch
    GitHub->>GitHub Actions: Trigger release_pub workflow
    GitHub Actions->>GitHub Actions: Set up Dart/Flutter and Melos
    GitHub Actions->>GitHub Actions: Bootstrap workspace and lint
    GitHub Actions->>Pub.dev: Publish packages using Melos
Loading

Poem

A hop, a skip, a workflow new,
To GitHub and pub.dev we flew!
With Melos scripts and Actions bright,
Our packages launch in automated flight.
Release with a tag, or push with glee—
The bunny’s CI dreams, now reality!
🐇✨


🪧 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.
    • Explain this complex logic.
    • 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 explain this code block.
    • @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 explain its main purpose.
    • @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.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

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 generate sequence diagram to generate a sequence diagram of the changes in 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
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: 1

🧹 Nitpick comments (6)
.github/workflows/release_pub.yml (2)

24-25: Pin Flutter version for reproducibility
It’s best practice to declare a specific Flutter version (or channel) when using the subosito/flutter-action@v2 to avoid unexpected breaks as new Flutter versions roll out.

-      - name: 🐦 Install Flutter
-        uses: subosito/flutter-action@v2
+      - name: 🐦 Install Flutter
+        uses: subosito/flutter-action@v2
+        with:
+          flutter-version: "3.27.4"
+          channel: stable

36-36: Add newline at end of file
YAML parsers expect a trailing newline.

🧰 Tools
🪛 YAMLlint (1.37.1)

[error] 36-36: no new line character at the end of file

(new-line-at-end-of-file)

melos.yaml (2)

151-154: Unify flag syntax for consistency
In both lint:pub and release:pub scripts you’re using -c1. For readability and alignment with other commands, prefer a space between flag and value (-c 1).

-    run: melos exec -c1 --no-published --no-private --order-dependents -- "flutter pub publish -n"
+    run: melos exec -c 1 --no-published --no-private --order-dependents -- "flutter pub publish -n"

-  release:pub:
-    run: melos exec -c1 --no-published --no-private --order-dependents -- "flutter pub publish -f"
+  release:pub:
+    run: melos exec -c 1 --no-published --no-private --order-dependents -- "flutter pub publish -f"

Also applies to: 206-208


208-208: Add newline at end of file
YAML files should end with a newline to satisfy lint rules.

🧰 Tools
🪛 YAMLlint (1.37.1)

[error] 208-208: no new line character at the end of file

(new-line-at-end-of-file)

.github/workflows/release_github.yml (2)

15-16: Align checkout action version
In release_pub.yml you’re using actions/checkout@v4. For consistency, consider upgrading this step to actions/checkout@v4 here as well.

-      - name: 📚 Checkout branch
-        uses: actions/checkout@v3
+      - name: 📚 Checkout branch
+        uses: actions/checkout@v4

51-51: Add newline at end of file
A trailing newline is required to pass YAML lint.

🧰 Tools
🪛 YAMLlint (1.37.1)

[error] 51-51: no new line character at the end of file

(new-line-at-end-of-file)

📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between 3b3241a and 4e38df8.

📒 Files selected for processing (3)
  • .github/workflows/release_github.yml (1 hunks)
  • .github/workflows/release_pub.yml (1 hunks)
  • melos.yaml (2 hunks)
🧰 Additional context used
🪛 YAMLlint (1.37.1)
.github/workflows/release_pub.yml

[error] 36-36: no new line character at the end of file

(new-line-at-end-of-file)

melos.yaml

[error] 208-208: no new line character at the end of file

(new-line-at-end-of-file)

.github/workflows/release_github.yml

[error] 51-51: no new line character at the end of file

(new-line-at-end-of-file)


[error] 10-10: syntax error: mapping values are not allowed here

(syntax)

🪛 actionlint (1.7.7)
.github/workflows/release_github.yml

10-10: could not parse as YAML: yaml: line 10: mapping values are not allowed in this context

(syntax-check)

⏰ Context from checks skipped due to timeout of 90000ms (2)
  • GitHub Check: stream_chat_localizations
  • GitHub Check: stream_chat_flutter
🔇 Additional comments (1)
.github/workflows/release_github.yml (1)

5-6: Verify default branch name
This workflow only runs on pushes to master. Please confirm that the repository’s default branch is indeed master; otherwise update the branches filter to match (main or another).

Copy link
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

♻️ Duplicate comments (1)
.github/workflows/release_github.yml (1)

10-10: ⚠️ Potential issue

Fix if expression syntax
GitHub Actions requires ${{ }} around conditional expressions. Without it, the job will fail to parse.
Apply this diff:

-    if: {{ startsWith(github.event.head_commit.message, 'chore(repo): release') }}
+    if: ${{ startsWith(github.event.head_commit.message, 'chore(repo): release') }}
🧰 Tools
🪛 YAMLlint (1.37.1)

[error] 10-10: syntax error: expected ',' or '}', but got ''

(syntax)

🧹 Nitpick comments (2)
melos.yaml (1)

208-208: Add newline at end of file
YAMLLint flagged a missing end-of-file newline. Please append a blank line after the last line to satisfy the linter.

🧰 Tools
🪛 YAMLlint (1.37.1)

[error] 208-208: no new line character at the end of file

(new-line-at-end-of-file)

.github/workflows/release_github.yml (1)

51-51: Add newline at end of file
YAMLLint reports no newline at end-of-file. Please add a terminating blank line to ensure valid YAML.

🧰 Tools
🪛 YAMLlint (1.37.1)

[error] 51-51: no new line character at the end of file

(new-line-at-end-of-file)

📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between 4e38df8 and e1d4ce5.

📒 Files selected for processing (2)
  • .github/workflows/release_github.yml (1 hunks)
  • melos.yaml (2 hunks)
🧰 Additional context used
🪛 actionlint (1.7.7)
.github/workflows/release_github.yml

9-9: could not parse as YAML: yaml: line 9: did not find expected ',' or '}'

(syntax-check)

🪛 YAMLlint (1.37.1)
.github/workflows/release_github.yml

[error] 51-51: no new line character at the end of file

(new-line-at-end-of-file)


[error] 10-10: syntax error: expected ',' or '}', but got ''

(syntax)

melos.yaml

[error] 208-208: no new line character at the end of file

(new-line-at-end-of-file)

🔇 Additional comments (2)
melos.yaml (2)

151-153: Approve updated lint:pub script
The simplified lint:pub task, using -n for dry-run and the refined flags (--no-published, --no-private, --order-dependents) aligns with Melos best practices and reduces unnecessary concurrent jobs.


206-208: Approve new release:pub script
The release:pub script correctly mirrors lint:pub but uses -f for force publishing. This complements your GitHub Actions workflow and cleanly automates package publication to pub.dev.

🧰 Tools
🪛 YAMLlint (1.37.1)

[error] 208-208: no new line character at the end of file

(new-line-at-end-of-file)

Copy link
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: 1

🧹 Nitpick comments (3)
.github/workflows/release_github.yml (3)

29-31: Improve regex robustness for version extraction

The current regex will match the first SemVer-like substring anywhere in the message, which may lead to false positives in complex commit messages. Consider anchoring or adding word boundaries:

- version_regex='[vV][0-9]+\.[0-9]+\.[0-9]+(-[0-9A-Za-z.\-]+)?'
+ version_regex='\b[vV][0-9]+\.[0-9]+\.[0-9]+(?:-[0-9A-Za-z.-]+)?\b'

This ensures you match a standalone tag exactly.


47-53: Consider pinning or upgrading action-gh-release version

The workflow uses softprops/action-gh-release@v1. Verify if a newer major version (e.g., v2) exists for improved features or security patches. Alternatively, pin to a specific minor release (e.g., v1.5.0) or a full commit SHA to lock behavior.

🧰 Tools
🪛 YAMLlint (1.37.1)

[error] 53-53: no new line character at the end of file

(new-line-at-end-of-file)


53-53: Add a newline at end of file

YAML linters often require a trailing newline. Please append an empty line after the last entry to satisfy standard lint rules.

🧰 Tools
🪛 YAMLlint (1.37.1)

[error] 53-53: no new line character at the end of file

(new-line-at-end-of-file)

📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between e1d4ce5 and d8b4522.

📒 Files selected for processing (2)
  • .github/workflows/release_github.yml (1 hunks)
  • melos.yaml (2 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • melos.yaml
🧰 Additional context used
🪛 actionlint (1.7.7)
.github/workflows/release_github.yml

10-10: could not parse as YAML: yaml: line 10: mapping values are not allowed in this context

(syntax-check)

🪛 YAMLlint (1.37.1)
.github/workflows/release_github.yml

[error] 53-53: no new line character at the end of file

(new-line-at-end-of-file)


[error] 10-10: syntax error: mapping values are not allowed here

(syntax)

⏰ Context from checks skipped due to timeout of 90000ms (2)
  • GitHub Check: stream_chat_flutter
  • GitHub Check: stream_chat_localizations
🔇 Additional comments (5)
.github/workflows/release_github.yml (5)

3-6: Verify branch filter aligns with repository default

This workflow triggers on pushes to master. Confirm your repo’s default branch is indeed named master and not main (or another). If the default branch differs, update this filter to avoid missing release events.


10-10: Correct usage of ${{ }} for the if condition

The if: expression is properly wrapped in ${{ }}, ensuring it’s parsed and evaluated by GitHub Actions as intended.

🧰 Tools
🪛 actionlint (1.7.7)

10-10: could not parse as YAML: yaml: line 10: mapping values are not allowed in this context

(syntax-check)

🪛 YAMLlint (1.37.1)

[error] 10-10: syntax error: mapping values are not allowed here

(syntax)


14-18: Checkout action configured correctly

Using actions/checkout@v4 with fetch-depth: 0 ensures full history is available for tag extraction and accurate release-note generation.


19-24: Robust Bash setup for tag extraction

Including set -euo pipefail at the top of the script makes it fail fast on errors, undefined variables, or pipeline failures—good practice for CI scripts.


25-28: Proper retrieval and logging of commit message

Capturing the commit message in a variable and echoing it improves debuggability by making it clear exactly what text the regex is matching against.

Copy link
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: 1

♻️ Duplicate comments (1)
.github/workflows/release_github.yml (1)

42-43: Fix error annotation syntax

GitHub Actions error annotations must have no spaces between the directive and ::. Update both lines so errors are correctly surfaced in the UI:

-            echo "::error ::❌ No SemVer tag found in commit message."
-            echo "::error ::Expected something like: 'chore(repo): release v1.2.3[-beta]'"
+            echo "::error::❌ No SemVer tag found in commit message."
+            echo "::error::Expected something like: chore(repo): release v1.2.3[-beta]"
🧹 Nitpick comments (3)
.github/workflows/release_github.yml (3)

11-11: Remove or explain commented-out if conditional

The commented-out if: line is dead code and could confuse readers. Either remove the commented filter entirely or re-enable/configure it if you intend to guard this job to only run on specific commit messages.


48-48: Pin softprops/action-gh-release to a fixed version

Using a floating major tag (@v1) can introduce breaking changes unexpectedly. Pin to a specific minor/patch release to ensure reproducible workflows:

-      - uses: softprops/action-gh-release@v1
+      - uses: softprops/action-gh-release@v1.3.0  # pin to the current stable patch
🧰 Tools
🪛 actionlint (1.7.7)

48-48: the runner of "softprops/action-gh-release@v1" action is too old to run on GitHub Actions. update the action's version to fix this issue

(action)


54-54: Ensure newline at end of file

Add a newline at the end of this YAML file to satisfy linters and POSIX conventions.

🧰 Tools
🪛 YAMLlint (1.37.1)

[error] 54-54: no new line character at the end of file

(new-line-at-end-of-file)

📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between d8b4522 and 13d655c.

📒 Files selected for processing (6)
  • .github/workflows/release_github.yml (1 hunks)
  • packages/stream_chat/pubspec.yaml (1 hunks)
  • packages/stream_chat_flutter/pubspec.yaml (1 hunks)
  • packages/stream_chat_flutter_core/pubspec.yaml (1 hunks)
  • packages/stream_chat_localizations/pubspec.yaml (1 hunks)
  • packages/stream_chat_persistence/pubspec.yaml (1 hunks)
✅ Files skipped from review due to trivial changes (5)
  • packages/stream_chat/pubspec.yaml
  • packages/stream_chat_flutter/pubspec.yaml
  • packages/stream_chat_persistence/pubspec.yaml
  • packages/stream_chat_flutter_core/pubspec.yaml
  • packages/stream_chat_localizations/pubspec.yaml
🧰 Additional context used
🪛 actionlint (1.7.7)
.github/workflows/release_github.yml

48-48: the runner of "softprops/action-gh-release@v1" action is too old to run on GitHub Actions. update the action's version to fix this issue

(action)

🪛 YAMLlint (1.37.1)
.github/workflows/release_github.yml

[error] 54-54: no new line character at the end of file

(new-line-at-end-of-file)

⏰ Context from checks skipped due to timeout of 90000ms (3)
  • GitHub Check: build (android)
  • GitHub Check: test
  • GitHub Check: analyze_legacy_versions

Copy link

codecov bot commented Jun 3, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 63.28%. Comparing base (3b3241a) to head (ba0a445).

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #2271   +/-   ##
=======================================
  Coverage   63.28%   63.28%           
=======================================
  Files         404      404           
  Lines       25269    25269           
=======================================
  Hits        15992    15992           
  Misses       9277     9277           

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

@xsahil03x xsahil03x force-pushed the feat/automatic-release branch from 11be847 to 8f60730 Compare June 3, 2025 10:13
@xsahil03x xsahil03x merged commit 9fc0f6f into master Jun 3, 2025
11 of 12 checks passed
@xsahil03x xsahil03x deleted the feat/automatic-release branch June 3, 2025 12:48
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