Skip to content

Conversation

@netmindz
Copy link
Collaborator

@netmindz netmindz commented Jan 28, 2026

Summary by CodeRabbit

Release Notes

  • Chores
    • Improved CI/CD pipeline with enhanced build caching and parallel compilation for faster feedback cycles
    • Automated nightly release process for regular pre-release build distribution

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

@coderabbitai
Copy link

coderabbitai bot commented Jan 28, 2026

Warning

Rate limit exceeded

@netmindz has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 4 minutes and 50 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.

Note

.coderabbit.yaml has unrecognized properties

CodeRabbit is using all valid settings from your configuration. Unrecognized properties (listed below) have been ignored and may indicate typos or deprecated fields that can be removed.

⚠️ Parsing warnings (1)
Validation error: Unrecognized key(s) in object: 'review', 'context'
⚙️ Configuration instructions
  • Please see the configuration documentation for more information.
  • You can also validate your configuration using the online YAML validator.
  • 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
📝 Walkthrough

Walkthrough

The pull request introduces a reusable GitHub Actions workflow architecture for PlatformIO builds. A new build.yml workflow extracts PlatformIO environments and performs parallel matrix builds with caching and artifact uploads. The existing ci-pio.yaml is refactored to invoke this reusable workflow, and a new nightly.yml workflow is added to automatically publish nightly releases on a scheduled cadence.

Changes

Cohort / File(s) Summary
Reusable Build Workflow
.github/workflows/build.yml
New reusable workflow with two jobs: get_default_envs extracts PlatformIO environments as outputs; build job uses matrix strategy over environments with caching for pip and PlatformIO, executes pio run for each environment, and uploads artifacts from build/release/*.bin and build/merged/*.bin.
CI Pipeline Integration
.github/workflows/ci-pio.yaml
Refactored to invoke the new reusable build.yml workflow via uses: directive. Expanded trigger to run on all branch pushes and pull requests. Removed inline step definitions for checkout, caching, Python setup, and PlatformIO build steps.
Nightly Release Automation
.github/workflows/nightly.yml
New workflow triggered on 2 AM UTC schedule or manual dispatch. Contains two jobs: wled_build reuses the build.yml workflow; nightly job downloads artifacts, generates changelog from tags (excluding certain labels), and publishes a prerelease using andelf/nightly-release with tag "nightly".

Sequence Diagram(s)

sequenceDiagram
    participant GH as GitHub Events
    participant CI as ci-pio.yaml
    participant Build as build.yml
    participant PIO as PlatformIO
    participant Artifact as Artifact Storage
    participant Nightly as nightly.yml
    participant Release as Release Publisher

    GH->>CI: Push to any branch / PR
    CI->>Build: Trigger reusable workflow
    Build->>Build: get_default_envs: Extract environments
    Build->>PIO: Matrix build: pio run -e ENV
    PIO->>PIO: Build for each environment
    PIO->>Artifact: Upload *.bin artifacts
    
    GH->>Nightly: Scheduled (2 AM UTC) / Manual dispatch
    Nightly->>Build: Trigger build.yml
    Build->>PIO: Build all environments
    PIO->>Artifact: Upload artifacts
    Nightly->>Artifact: Download build artifacts
    Nightly->>Nightly: Generate changelog from tags
    Nightly->>Release: Publish nightly release
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~22 minutes

Poem

🐰 Workflows reused, like carrots in spring,
Matrix builds now doing their thing,
Nightly releases hop and dance,
CI pipelines in perfect stance!
Artifacts bundled, ready to go,
GitHub Actions steal the show! 🚀

🚥 Pre-merge checks | ✅ 3
✅ 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 'Matrix builds' directly reflects the main change: introducing matrix-based parallel builds through new GitHub Actions workflow infrastructure.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks 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

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

🤖 Fix all issues with AI agents
In @.github/workflows/build.yml:
- Around line 23-24: The shell string passed to echo contains unescaped inner
double quotes which break the outer quoting; edit the run command that contains
echo "environments=$(pio project config --json-output | jq -c '[.[] |
select(.[0] | startswith("env:")) | .[0] | sub("^env:"; "")]')" >>
$GITHUB_OUTPUT so that the jq expressions use single quotes (e.g.
startswith('env:') and sub('^env:'; '')) or escape the inner quotes, ensuring
the whole echo argument remains a valid double-quoted shell string.

In @.github/workflows/ci-pio.yaml:
- Around line 3-6: The workflow's push trigger uses branches: - '*' which does
not match branch names containing slashes (e.g., feature/foo); update the push
trigger under the on -> push -> branches section to either use the glob '**'
(branches: - '**') or remove the branches filter entirely so all branches
trigger CI, ensuring branch patterns like feature/* are matched; edit the 'on',
'push', and 'branches' entries to apply the chosen change.

In @.github/workflows/nightly.yml:
- Around line 10-11: The workflow currently sets permissions: contents: write
but lacks read access for issues and pull-requests which the
janheinrichmerker/action-github-changelog-generator@v2.3 action requires; update
the permissions block to explicitly include read scopes for issues and
pull-requests (e.g., add permissions keys for issues: read and pull-requests:
read alongside contents: write) so the changelog generator can access required
data.

Comment on lines +23 to +24
run: |
echo "environments=$(pio project config --json-output | jq -c '[.[] | select(.[0] | startswith("env:")) | .[0] | sub("^env:"; "")]')" >> $GITHUB_OUTPUT
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

Fix the quoting in the jq filter to avoid a shell parse error.

The inner double quotes break the outer double-quoted string, so this step will fail before writing the output.

✅ Suggested fix
-        echo "environments=$(pio project config --json-output | jq -c '[.[] | select(.[0] | startswith("env:")) | .[0] | sub("^env:"; "")]')" >> $GITHUB_OUTPUT
+        echo "environments=$(pio project config --json-output | jq -c '[.[] | select(.[0] | startswith(\"env:\")) | .[0] | sub(\"^env:\"; \"\")]')" >> "$GITHUB_OUTPUT"
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
run: |
echo "environments=$(pio project config --json-output | jq -c '[.[] | select(.[0] | startswith("env:")) | .[0] | sub("^env:"; "")]')" >> $GITHUB_OUTPUT
run: |
echo "environments=$(pio project config --json-output | jq -c '[.[] | select(.[0] | startswith(\"env:\")) | .[0] | sub(\"^env:\"; \"\")]')" >> "$GITHUB_OUTPUT"
🤖 Prompt for AI Agents
In @.github/workflows/build.yml around lines 23 - 24, The shell string passed to
echo contains unescaped inner double quotes which break the outer quoting; edit
the run command that contains echo "environments=$(pio project config
--json-output | jq -c '[.[] | select(.[0] | startswith("env:")) | .[0] |
sub("^env:"; "")]')" >> $GITHUB_OUTPUT so that the jq expressions use single
quotes (e.g. startswith('env:') and sub('^env:'; '')) or escape the inner
quotes, ensuring the whole echo argument remains a valid double-quoted shell
string.

Comment on lines +3 to +6
on:
push:
branches:
- '*'
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

🧩 Analysis chain

🏁 Script executed:

cat .github/workflows/ci-pio.yaml

Repository: MoonModules/MoonLight

Length of output: 196


🌐 Web query:

GitHub Actions branch filter pattern matching asterisk vs double asterisk documentation

💡 Result:

In GitHub Actions branches, branches-ignore, tags, and tags-ignore filters use glob patterns. (docs.github.com)

* vs ** (branch/tag filters)

  • * matches 0+ characters except /. So it will not cross a path segment boundary. Example pattern: feature/* matches feature/my-branch but not feature/mona/the/octocat. (docs.github.com)
  • ** matches 0+ characters including /, so it can span multiple /-separated segments. Example pattern: feature/** matches feature/mona/the/octocat. (docs.github.com)

Common gotchas

  • '*' matches all branch/tag names that don’t contain /, while '**' matches all branch/tag names. (docs.github.com)
  • If your pattern starts with * (or ! or [), you must quote it in YAML (e.g., '*', '**', '!releases/**-alpha'). (docs.github.com)

Citations:


'*' doesn't match branches with slashes; consider ** or drop the filter.

This can skip CI on branches like feature/foo.

✅ Suggested fix
   push:
     branches:
-      - '*'
+      - '**'
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
on:
push:
branches:
- '*'
on:
push:
branches:
- '**'
🤖 Prompt for AI Agents
In @.github/workflows/ci-pio.yaml around lines 3 - 6, The workflow's push
trigger uses branches: - '*' which does not match branch names containing
slashes (e.g., feature/foo); update the push trigger under the on -> push ->
branches section to either use the glob '**' (branches: - '**') or remove the
branches filter entirely so all branches trigger CI, ensuring branch patterns
like feature/* are matched; edit the 'on', 'push', and 'branches' entries to
apply the chosen change.

Comment on lines +10 to +11
permissions:
contents: write
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🏁 Script executed:

cat -n .github/workflows/nightly.yml

Repository: MoonModules/MoonLight

Length of output: 1725


🌐 Web query:

janheinrichmerker/action-github-changelog-generator permissions required

💡 Result:

For janheinrichmerker/action-github-changelog-generator, the token only needs read access (it reads tags/commits + issues + PRs to build the changelog; it doesn’t write back). (github.com)

Minimal recommended GITHUB_TOKEN permissions:

permissions:
  contents: read      # tags/commits
  issues: read        # closed issues
  pull-requests: read # merged PRs

You can set permissions at the workflow or job level; anything omitted becomes none. (github.blog)

Citations:


Add read permissions for issues and pull-requests to unblock changelog generation.

The workflow uses janheinrichmerker/action-github-changelog-generator@v2.3, which requires read access to issues and pull requests to build the changelog. Without explicit permissions, these scopes default to none.

✅ Suggested fix
 permissions:
   contents: write
+  issues: read
+  pull-requests: read
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
permissions:
contents: write
permissions:
contents: write
issues: read
pull-requests: read
🤖 Prompt for AI Agents
In @.github/workflows/nightly.yml around lines 10 - 11, The workflow currently
sets permissions: contents: write but lacks read access for issues and
pull-requests which the janheinrichmerker/action-github-changelog-generator@v2.3
action requires; update the permissions block to explicitly include read scopes
for issues and pull-requests (e.g., add permissions keys for issues: read and
pull-requests: read alongside contents: write) so the changelog generator can
access required data.

@netmindz netmindz merged commit 7750fac into MoonModules:main Jan 28, 2026
17 checks passed
@netmindz netmindz deleted the matrix branch January 28, 2026 22:43
@coderabbitai coderabbitai bot mentioned this pull request Jan 28, 2026
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