feat: add Nix flake input auto-merge rules to org preset#90
feat: add Nix flake input auto-merge rules to org preset#90JacobPEvans merged 2 commits intomainfrom
Conversation
Add packageRules for the Renovate nix manager (git-refs datasource):
- JacobPEvans-owned inputs: immediate auto-merge
- Trusted Nix ecosystem (NixOS, nix-community, cachix, anthropics,
etc.): auto-merge after 3-day stabilization
This enables per-repo opt-in via `"nix": { "enabled": true }` in
renovate.json, replacing custom deps-update-flake.yml workflows
with Renovate's native per-input PRs, descriptions, and auto-merge.
(claude)
Summary of ChangesHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request enhances dependency management by integrating Renovate's native Nix manager with new auto-merge rules. It streamlines the update process for Nix flake inputs by categorizing them based on ownership and trust, allowing for immediate or delayed automatic merging, thereby centralizing and automating a significant portion of dependency updates. Highlights
Changelog
Activity
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. A flake input flows, Renovate watches with care, Updates merge with grace. Footnotes
|
There was a problem hiding this comment.
Pull request overview
Adds Renovate preset rules to auto-merge Nix flake input updates, differentiating immediate auto-merge for JacobPEvans-owned inputs vs. delayed auto-merge for a curated list of trusted upstream owners. This supports the broader migration from custom flake.lock update workflows to Renovate’s native nix manager.
Changes:
- Add packageRules for
matchManagers: ["nix"]to auto-merge JacobPEvans-owned flake inputs immediately. - Add packageRules for
matchManagers: ["nix"]to auto-merge trusted-owner flake inputs after a 3-day stabilization window.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
…easeAge for nix rules git-refs datasource has no timestamp support, so minimumReleaseAge silently does nothing. Add matchDatasources: ["git-refs"] to scope nix rules precisely. Update trusted rule description to reflect immediate merging. (claude)
Summary
packageRulesfor Renovate'snixmanager (git-refsdatasource)This is the centralized half of migrating flake.lock updates from custom
deps-update-flake.ymlworkflows to Renovate's native nix manager. Per-repo opt-in via"nix": { "enabled": true }in each repo'srenovate.json.Merge order
Test plan
🤖 Generated with Claude Code
Greptile Summary
This PR adds two
packageRulesentries to the org-wide Renovate preset for thenixmanager (flake input updates viagit-refsdatasource). JacobPEvans-owned flake inputs get immediate auto-merge, while a curated list of trusted Nix ecosystem orgs gets auto-merge after a 3-day stabilization window. The approach fits cleanly into the existing tiered auto-merge pattern already used for GitHub Actions and pre-commit rules.Key findings:
packageNamefor nix manager is the fully-qualified HTTPS URL (e.g.https://github.com/NixOS/nixpkgs), matching the glob patterns used here"matchUpdateTypes": ["major"], "automerge": falserule doesn't interfere since flake input updates aredigesttype, notmajormatchManagers: ["nix"]constraint correctly scopes these rules to flake inputs onlyminimumReleaseAgemay be ineffective forgit-refs— the Renovategit-refsdatasource docs explicitly stateRelease timestamp support: No. SinceminimumReleaseAgerequires a release timestamp to function, the intended 3-day stabilization window for trusted owners (NixOS, nix-community, cachix, etc.) may be silently ignored, causing immediate auto-merge — or conversely, may permanently block auto-merge. This is worth verifying against a real flake input update before relying on it as a safety control.Confidence Score: 3/5
git-refshaving no release timestamp support — verify empirically before depending on it as a security control.minimumReleaseAgeis honored by thegit-refsdatasource (which explicitly lacks timestamp support). If it's silently ignored, trusted-owner packages auto-merge immediately instead of after 3 days — a divergence from intent but not catastrophic since these are still vetted orgs. Score reflects the unverified behavior of a key safety feature rather than any structural bug.minimumReleaseAge: "3 days"may not be honored by thegit-refsdatasourceImportant Files Changed
packageRulesblocks for thenixmanager. Package name format using full HTTPS URLs is correct per Renovate docs. However,minimumReleaseAgefor the trusted-owner rule may be silently ineffective since thegit-refsdatasource doesn't support release timestamps — undermining the intended 3-day stabilization window.Flowchart
%%{init: {'theme': 'neutral'}}%% flowchart TD A[Renovate detects nix flake input update\ngit-refs datasource] --> B{matchManagers: nix} B -->|No match| Z[Default Renovate behavior] B -->|Match| C{matchPackageNames} C -->|https://github.com/JacobPEvans/**| D[Rule: JacobPEvans-owned\nautomerge: true\nminimumReleaseAge: 0 days\nstrategy: squash] C -->|NixOS / nix-community / cachix\nanthropics / numtide / hercules-ci\nDeterminateSystems / edolstra\noxalica / wakatime| E[Rule: Trusted owners\nautomerge: true\nminimumReleaseAge: 3 days ⚠️\nstrategy: squash] C -->|No match - untrusted owner| F[No automerge\nManual review required] D --> G[PR opened → auto-merged immediately ✅] E --> H{git-refs has release timestamp?} H -->|No — datasource limitation ⚠️| I[minimumReleaseAge may be\nsilently ignored or block forever] H -->|Yes — if resolved| J[Wait 3 days → auto-merge ✅] F --> K[PR stays open for human review] style I fill:#ff9999,color:#000 style H fill:#ffcc00,color:#000Prompt To Fix All With AI
Last reviewed commit: 8808426