Skip to content

T8852: migrate .github/mergify.yml to extends: mergify#27

Merged
dmbaturin merged 1 commit into
currentfrom
T8852-mergify-extends
May 14, 2026
Merged

T8852: migrate .github/mergify.yml to extends: mergify#27
dmbaturin merged 1 commit into
currentfrom
T8852-mergify-extends

Conversation

@andamasov
Copy link
Copy Markdown
Member

Change Summary

Replace the inline T8531 predecessor Mergify config in .github/mergify.yml with extends: mergify, deferring to the per-org central baseline (vyos/mergify on the vyos side, VyOS-Networks/mergify on the mirror).

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Code style update (formatting, renaming)
  • Refactoring (no functional changes)
  • Other (please describe):

Related Task(s)

Related PR(s)

Component(s) name

CI / Mergify configuration

Proposed changes

Old .github/mergify.yml inlined two stanzas verbatim from the T8531 predecessor rollout:

  • pull_request_rules — label conflicting PRs with conflicts.
  • 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: false
  • T-ID format rules for PR title and commit message headlines (invalid-title label)

This PR replaces the inline content with a single extends: mergify directive. Per Mergify extends: semantics, mergify is resolved within the same org — so:

  • On vyos/ipaddrcheck → resolves to vyos/mergify (uses @vyos/maintainers)
  • Mirror-propagated to VyOS-Networks/ipaddrcheck (if applicable) → resolves to VyOS-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:

  • I have read the CONTRIBUTING document
  • I have linked this PR to one or more Phabricator Task(s)
  • My commit headlines contain a valid Task id
  • My change requires a change to the documentation
  • I have updated the documentation accordingly

Backport

If the repo carries this file on circinus and sagitta branches as well, backport via @Mergifyio backport circinus sagitta after merge.

🤖 Generated by robots

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 13, 2026

Review Change Stack

📝 Walkthrough

Summary by CodeRabbit

  • Chores
    • Simplified Mergify configuration to inherit shared baseline settings, streamlining the CI/CD automation setup.

Walkthrough

This PR consolidates Mergify automation configuration by replacing in-file rules with baseline inheritance. Documentation comments and an extends: mergify directive replace explicit conflict-labeling rules and command-restriction definitions.

Changes

Mergify Configuration Baseline Inheritance

Layer / File(s) Summary
Mergify baseline inheritance
.github/mergify.yml
Configuration header documentation is added; extends: mergify imports shared automation rules, replacing prior pull_request_rules conflict-labeling and commands_restrictions action gating (backport, copy, dequeue, queue, rebase, refresh, requeue, squash, update) with allowed sender conditions.
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed Title clearly describes the main change: migrating .github/mergify.yml to use extends: mergify instead of inline rules.
Description check ✅ Passed Description is comprehensive and directly related to the changeset, covering the rationale, components affected, and testing approach.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
✨ Simplify code
  • Create PR with simplified code
  • Commit simplified code in branch T8852-mergify-extends

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.

@andamasov
Copy link
Copy Markdown
Member Author

@copilot review

Copy link
Copy Markdown
Contributor

Copilot AI commented May 13, 2026

@copilot review

Reviewed the PR changes and CI status; no additional changes are needed for this review request. Current commit: e4a7733.

@andamasov andamasov marked this pull request as ready for review May 13, 2026 18:04
@andamasov andamasov requested review from dmbaturin and jestabro May 13, 2026 18:05
Copy link
Copy Markdown

@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.

🧹 Nitpick comments (1)
.github/mergify.yml (1)

4-18: ⚡ Quick win

Trim duplicated baseline details from local comments.

.github/mergify.yml Lines 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

📥 Commits

Reviewing files that changed from the base of the PR and between 62ee645 and e4a7733.

📒 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 defaults and commands_restrictions key 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_rules or merge_protections section 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

Copy link
Copy Markdown
Contributor

@jestabro jestabro left a comment

Choose a reason for hiding this comment

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

Replace inline Mergify config with per-org version via extends directive.

@dmbaturin dmbaturin merged commit dcb892d into current May 14, 2026
6 checks passed
@vyosbot vyosbot added mirror-initiated This PR initiated for mirror sync workflow mirror-completed This PR has been mirrored successfully and removed mirror-initiated This PR initiated for mirror sync workflow labels May 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

mirror-completed This PR has been mirrored successfully

Development

Successfully merging this pull request may close these issues.

5 participants