Skip to content

Conversation

@gpunto
Copy link
Collaborator

@gpunto gpunto commented Dec 17, 2025

Moving them from https://github.com/GetStream/android-ci-actions/

Summary by CodeRabbit

  • Documentation

    • Updated GitHub Actions README examples to reference external action paths instead of local action references.
  • Chores

    • Added automated workflows for PR quality checks, stale PR cleanup, SDK size comparisons, and SDK size updates.
    • Switched CI Gradle setup step to the updated Gradle setup action.

✏️ Tip: You can customize this high-level summary in your review settings.

@gpunto gpunto closed this Dec 17, 2025
@gpunto gpunto reopened this Dec 17, 2025
@gpunto gpunto marked this pull request as ready for review December 17, 2025 13:26
@coderabbitai
Copy link

coderabbitai bot commented Dec 17, 2025

Walkthrough

Updates GitHub Action references in docs and one action.yml, and adds four new workflows: stale PR cleanup, PR quality validation, SDK size checks, and SDK size updates. No application source code changes.

Changes

Cohort / File(s) Summary
Action README updates
.github/actions/bump-version/README.md, .github/actions/setup-gradle/README.md
Usage examples updated to reference the external action path GetStream/stream-build-conventions-android/.github/actions/...@main instead of local action paths.
Gradle setup action config
.github/actions/setup-gradle/action.yml
Replaced gradle/gradle-build-action@v3 with gradle/actions/setup-gradle@v3 in the action step.
Stale PR cleanup workflow
.github/workflows/pr-clean-stale.yaml
New workflow to mark PRs stale and close them after configured days, with exempt label support and workflow_call trigger.
PR quality validation workflow
.github/workflows/pr-quality.yml
New workflow validating PR title (5–18 words), requiring at least one pr: label, and ensuring Goal/Implementation/Testing sections are present; manages sticky comments for failures/success.
SDK size checks workflow
.github/workflows/sdk-size-checks.yml
New workflow to build metrics, read metrics/size.json, compute per-module APK size deltas, format a Markdown table with status emoji, and post or log results (handles forked vs non-forked PRs).
SDK size updates workflow
.github/workflows/sdk-size-updates.yml
New workflow to assemble artifacts, compute per-module size deltas, update metrics/size.json and README badges, and commit/push changes back to the triggering branch using a PAT.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

  • Focus review on:
    • .github/workflows/pr-quality.yml — validation rules, failure aggregation, and sticky comment create/update logic.
    • .github/workflows/sdk-size-checks.yml and .github/workflows/sdk-size-updates.yml — shell/jq logic, file existence checks, size calculations, badge generation, and commit/push authentication.
    • .github/actions/setup-gradle/action.yml — confirm compatibility of the new Gradle action reference.
    • README changes — verify example correctness and that external action paths and @refs are accurate.

🐰 A rabbit hops in with a tiny cheer,
Workflows polished, tidy, and clear.
Stale PRs swept, checklists humming bright,
Sizes tallied in the moonlit night.
Commit and badge — the branch feels light.

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: moving shared workflows to the conventions repository, which matches the PR's primary objective and the new workflow files added.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch move-workflows

📜 Recent review details

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Disabled knowledge base sources:

  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between c77c8f8 and 5a570f1.

📒 Files selected for processing (4)
  • .github/workflows/pr-clean-stale.yaml (1 hunks)
  • .github/workflows/pr-quality.yml (1 hunks)
  • .github/workflows/sdk-size-checks.yml (1 hunks)
  • .github/workflows/sdk-size-updates.yml (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (4)
  • .github/workflows/pr-quality.yml
  • .github/workflows/sdk-size-checks.yml
  • .github/workflows/sdk-size-updates.yml
  • .github/workflows/pr-clean-stale.yaml
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: Build and validate

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.

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

🧹 Nitpick comments (4)
.github/workflows/pr-quality.yml (1)

97-122: Minor: Inconsistent indentation on line 97.

The comment on line 97 has extra leading spaces. While valid YAML, aligning it with other step comments would improve readability.

-            # Compute the latest sticky comment id (by our anchor). If none, output is empty.
+      # Compute the latest sticky comment id (by our anchor). If none, output is empty.
       - name: Compute sticky comment id
.github/workflows/sdk-size-updates.yml (1)

44-44: Consider pinning the action reference to a specific version.

The action is referenced using @main, which could introduce instability if the main branch receives breaking changes. Consider using a tagged release or commit SHA instead.

-        uses: GetStream/stream-build-conventions-android/.github/actions/setup-gradle@main
+        uses: GetStream/stream-build-conventions-android/.github/actions/[email protected]
.github/workflows/sdk-size-checks.yml (2)

30-31: Document the units for tolerance thresholds.

The tolerance values are used to compare size differences, but their units (kilobytes) are not documented. Adding a comment or using more descriptive names would improve maintainability.

+  # Tolerance thresholds in kilobytes (KB)
   MAX_TOLERANCE: 500
   FINE_TOLERANCE: 250

42-42: Consider pinning the action reference to a specific version.

The action is referenced using @main, which could introduce instability if the main branch receives breaking changes. Consider using a tagged release or commit SHA instead.

-        uses: GetStream/stream-build-conventions-android/.github/actions/setup-gradle@main
+        uses: GetStream/stream-build-conventions-android/.github/actions/[email protected]
📜 Review details

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Disabled knowledge base sources:

  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between f63ab3d and c77c8f8.

📒 Files selected for processing (7)
  • .github/actions/bump-version/README.md (2 hunks)
  • .github/actions/setup-gradle/README.md (1 hunks)
  • .github/actions/setup-gradle/action.yml (1 hunks)
  • .github/workflows/pr-clean-stale.yaml (1 hunks)
  • .github/workflows/pr-quality.yml (1 hunks)
  • .github/workflows/sdk-size-checks.yml (1 hunks)
  • .github/workflows/sdk-size-updates.yml (1 hunks)
🔇 Additional comments (8)
.github/actions/setup-gradle/action.yml (1)

19-22: LGTM!

The update from gradle/gradle-build-action@v3 to gradle/actions/setup-gradle@v3 correctly reflects the official Gradle action repository restructuring. The cache-read-only input forwarding remains intact.

.github/actions/bump-version/README.md (1)

28-28: LGTM!

The documentation correctly references the public action path, aligning with the PR's goal of consolidating shared workflows into this repository.

Also applies to: 44-44

.github/actions/setup-gradle/README.md (1)

20-20: LGTM!

All usage examples consistently reference the public action path.

Also applies to: 26-26, 34-34

.github/workflows/pr-clean-stale.yaml (2)

15-30: LGTM!

The stale PR configuration is well-structured with reasonable timeframes (14 days stale, 7 days to close) and clear messaging. The exempt label pr:keep-open provides a good escape hatch for PRs that need to remain open.


6-9: Consider removing unused issues: write permission.

The workflow explicitly skips issues (days-before-stale: -1 and days-before-close: -1), so the issues: write permission appears unnecessary. Verify whether actions/stale@v9 truly requires this permission when only processing PRs.

.github/workflows/pr-quality.yml (1)

127-165: LGTM!

The sticky comment pattern is well-implemented. Using if: failure() and if: success() correctly gates which comment is displayed, and the anchor-based matching ensures updates rather than duplicate comments.

.github/workflows/sdk-size-checks.yml (1)

79-144: LGTM! Well-implemented comment upsert logic.

The github-script implementation correctly:

  • Handles missing baseline data gracefully (line 85, 92)
  • Detects fork PRs and logs instead of commenting (lines 107-115)
  • Implements proper comment upsert by finding and updating existing comments (lines 120-144)
  • Provides clear status indicators based on tolerance thresholds
.github/workflows/sdk-size-updates.yml (1)

54-86: Add error handling for command failures and use set -e for the script.

The script lacks error handling for commands that could fail. While jq, du, and awk are available on GitHub-hosted ubuntu-latest runners, the script should handle potential failures gracefully. If du output is empty, the arithmetic operation on line 69 could fail. If jq encounters issues updating the JSON, the metrics.json file could become corrupted for subsequent iterations, but the loop continues without notification.

Add set -e at the start of the script block and consider wrapping the jq update (line 76-77) with error handling to ensure the script fails loudly if JSON manipulation fails.

@gpunto gpunto requested a review from a team December 17, 2025 14:03
@gpunto gpunto enabled auto-merge (squash) December 17, 2025 14:16
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