T8852: migrate .github/mergify.yml to extends: mergify#27
Conversation
📝 WalkthroughSummary by CodeRabbit
WalkthroughThis PR consolidates Mergify automation configuration by replacing in-file rules with baseline inheritance. Documentation comments and an ChangesMergify Configuration Baseline Inheritance
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches✨ Simplify code
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. Comment |
|
@copilot review |
Reviewed the PR changes and CI status; no additional changes are needed for this review request. Current commit: |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
.github/mergify.yml (1)
4-18: ⚡ Quick winTrim duplicated baseline details from local comments.
.github/mergify.ymlLines 4-18 restate the shared baseline's concrete rules, defaults, and org-specific team mappings. That reintroduces drift: this repo can stay correctly configured while the comments silently become wrong after the next central baseline change. Keep only a short pointer to the baseline/spec here.Proposed simplification
-# Inherits the central baseline from vyos/mergify:.mergify.yml. The central -# baseline provides: -# - `defaults.actions.backport.ignore_conflicts: false` -# - `pull_request_rules` → label conflicting PRs with `conflicts`; -# T-ID format checks on PR title and commit messages. -# - `commands_restrictions` → restrict `@Mergifyio` slash commands to the -# org Maintainers team + vyosbot. Resolves correctly on both sides of -# the cross-org mirror: vyos/mergify uses `@vyos/maintainers`, -# VyOS-Networks/mergify uses `@VyOS-Networks/maintainers`. -# -# Replaces the inline T8531 predecessor config. Rollout context: -# T8782 (Mergify central-config rollout), T8852 (fleet migration to -# `extends:`). See https://vyos.dev/T8782, https://vyos.dev/T8852, -# and the Confluence spec at -# https://vyos.atlassian.net/wiki/spaces/VYOS/pages/849477640. +# Inherits the shared Mergify baseline via same-org resolution. +# Source of truth lives in the org-level `mergify` repository. +# Rollout context: T8782 and T8852.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In @.github/mergify.yml around lines 4 - 18, The header comments in .github/mergify.yml duplicate the central baseline's detailed rules (the block describing defaults.actions.backport, pull_request_rules, commands_restrictions and team mappings); remove the repeated concrete descriptions and replace them with a single short pointer line referencing the central baseline (e.g., "extends: vyos/mergify:.mergify.yml — see central config and spec") and links to the rollout/spec docs so the file only documents where the real config lives rather than restating it.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In @.github/mergify.yml:
- Around line 4-18: The header comments in .github/mergify.yml duplicate the
central baseline's detailed rules (the block describing
defaults.actions.backport, pull_request_rules, commands_restrictions and team
mappings); remove the repeated concrete descriptions and replace them with a
single short pointer line referencing the central baseline (e.g., "extends:
vyos/mergify:.mergify.yml — see central config and spec") and links to the
rollout/spec docs so the file only documents where the real config lives rather
than restating it.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Central YAML (base), Organization UI (inherited)
Review profile: CHILL
Plan: Pro Plus
Run ID: 3b56164d-22ba-4b0f-b081-33116ec1bf83
📒 Files selected for processing (1)
.github/mergify.yml
📜 Review details
🧰 Additional context used
🔍 Remote MCP
Now let me search for information about how extending works with organization-specific repository references:Let me search for more specific documentation about how Mergify's extends mechanism resolves repository references:Based on my research, I have gathered sufficient relevant information about Mergify's configuration extension mechanism to provide a comprehensive summary for the PR review.
Summary of Relevant Context for PR Review
Mergify extends Configuration Mechanism
Mergify offers a feature to extend your configuration file by incorporating settings from another repository, using the extends keyword at the top of your configuration file and specifying the source repository. The Mergify configuration file now supports a new keyword extends which allows to inherits from a configuration file from a different repository.
Configuration Merging Behavior
Key aspects of how extended configurations are merged:
- The configuration from the specified repository will be loaded and applied before the one in the current repository.
- Values in the
defaultsandcommands_restrictionskey will be merged and remote default values will apply to local configuration, unless a same default value already exist in the local configuration. - Rules in the
pull_request_rules,queue_rules,priority_rulesormerge_protectionssection will be merged and remote default values will apply to local configuration. A rule will not be overwritten, by the extended configuration, if it has the same name in both the extended and local configuration.
Error Detection
The Mergify CLI can check your configuration file locally before you push, catching errors without waiting for a round-trip to GitHub, including syntax errors, invalid keys, and type mismatches. Additionally, you can validate your configuration locally using Mergify's pre-commit hook.
Organization-Level Configuration Benefits
The use case for centralizing configurations is when multiple repos follow roughly the same merging conditions - avoiding the need to add and maintain the same configuration in each repository individually, or make the same change in each repository when tweaking a setting.
[::web_search::]
🔇 Additional comments (1)
.github/mergify.yml (1)
1-3: LGTM!Also applies to: 20-20
jestabro
left a comment
There was a problem hiding this comment.
Replace inline Mergify config with per-org version via extends directive.
Change Summary
Replace the inline T8531 predecessor Mergify config in
.github/mergify.ymlwithextends: mergify, deferring to the per-org central baseline (vyos/mergify on the vyos side, VyOS-Networks/mergify on the mirror).Types of changes
Related Task(s)
extends:fleet migrationRelated PR(s)
extends:template: vyos/vyos-documentation/.github/mergify.yml.Component(s) name
CI / Mergify configuration
Proposed changes
Old
.github/mergify.ymlinlined two stanzas verbatim from the T8531 predecessor rollout:pull_request_rules— label conflicting PRs withconflicts.commands_restrictions— restrict @Mergifyio slash commands to@vyos/maintainers+vyosbot.Both stanzas now live in the per-org central baseline at vyos/mergify:.mergify.yml and VyOS-Networks/mergify:.mergify.yml. The central baseline also adds:
defaults.actions.backport.ignore_conflicts: falseinvalid-titlelabel)This PR replaces the inline content with a single
extends: mergifydirective. Per Mergifyextends:semantics,mergifyis resolved within the same org — so:vyos/ipaddrcheck→ resolves tovyos/mergify(uses@vyos/maintainers)VyOS-Networks/ipaddrcheck(if applicable) → resolves toVyOS-Networks/mergify(uses@VyOS-Networks/maintainers)How to test
After merge, a Maintainer can comment
@Mergifyio backport <branch>on a merged PR. Mergify should accept the command and create the backport PR. Pre-merge, Mergify itself surfaces config errors as PR comments if the YAML is malformed.Smoketest result
N/A — CI/Mergify-only change.
Checklist:
Backport
If the repo carries this file on
circinusandsagittabranches as well, backport via@Mergifyio backport circinus sagittaafter merge.🤖 Generated by robots