Skip to content

Conversation

@joaolfp
Copy link
Contributor

@joaolfp joaolfp commented Sep 6, 2025

Summary by CodeRabbit

  • Chores
    • Configured automated updates for the Rust toolchain via Renovate, ensuring timely version bumps and reducing manual maintenance.
    • Maintains existing commit message format while adding smarter detection of Rust version changes.
    • No user-facing behavior changes.

@coderabbitai
Copy link

coderabbitai bot commented Sep 6, 2025

Walkthrough

Introduced a regex-based Renovate custom manager in .github/renovate.json to detect and update Rust channel versions from rust-toolchain.toml using GitHub releases. Existing commit message settings remain unchanged.

Changes

Cohort / File(s) Summary
Renovate configuration
\.github/renovate.json
Added customManagers array with a regex manager targeting `/^

Sequence Diagram(s)

sequenceDiagram
  participant Renovate
  participant Repo
  participant GitHubReleases as GitHub Releases (rust-lang/rust)
  participant PR as PR

  Renovate->>Repo: Scan files
  Note over Renovate,Repo: Custom manager matches rust-toolchain.toml
  Renovate->>Repo: Read channel = "X.Y[.Z]"
  Renovate->>GitHubReleases: Fetch latest Rust releases
  GitHubReleases-->>Renovate: Release tags (versions)
  Renovate->>Renovate: Compare channel vs latest
  alt Update available
    Renovate->>Repo: Update channel value
    Renovate->>PR: Open PR with commitMessageTopic
  else Up-to-date
    Renovate-->>Repo: No action
  end
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

I nibble configs, ears a-twitch with cheer,
A regex hop finds Rustly versions here.
From toolchain trails to release burrows bright,
I bump the channel, tidy and light.
Thump-thump—Renovate hums through the night. 🐇✨

✨ Finishing Touches
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch structure/update-renovate

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

🧹 Nitpick comments (1)
.github/renovate.json (1)

15-15: Optional: clearer commit message topic.

If you prefer human-friendly subjects over owner/repo names, consider:

-  "commitMessageTopic": "{{depName}} to v{{newVersion}}",
+  "commitMessageTopic": "Rust toolchain to v{{newVersion}}",
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 21cf2aa and 89586b5.

📒 Files selected for processing (1)
  • .github/renovate.json (1 hunks)
⏰ 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). (3)
  • GitHub Check: build
  • GitHub Check: Summary
  • GitHub Check: build
🔇 Additional comments (1)
.github/renovate.json (1)

16-29: Fix invalid Renovate custom manager keys and dep name (config currently ineffective).

  • Replace managerFilePatterns with fileMatch (no literal slashes).
  • Drop packageNameTemplate; set "depNameTemplate": "rust-lang/rust".
  • Enforce three-part versions in matchStrings and add "versioningTemplate": "semver".
   "customManagers": [
     {
       "customType": "regex",
-      "depNameTemplate": "rust",
-      "packageNameTemplate": "rust-lang/rust",
+      "depNameTemplate": "rust-lang/rust",
       "datasourceTemplate": "github-releases",
-      "managerFilePatterns": [
-        "/(^|/)rust-toolchain\\.toml$/"
-      ],
+      "fileMatch": [
+        "(^|/)rust-toolchain\\.toml$"
+      ],
       "matchStrings": [
-        "channel\\s*=\\s*\"(?<currentValue>\\d+\\.\\d+(\\.\\d+)?)\""
+        "channel\\s*=\\s*\"(?<currentValue>\\d+\\.\\d+\\.\\d+)\""
       ],
+      "versioningTemplate": "semver"
     }
   ]

Validate after configuring a GitHub token:

export RENOVATE_TOKEN=<your_token>
npx -y renovate@latest validate .github/renovate.json

@mergify mergify bot merged commit 100f96e into main Sep 6, 2025
3 checks passed
@joaolfp joaolfp deleted the structure/update-renovate branch September 6, 2025 05:12
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