Skip to content

feat(config): find the configuration under the .yaml spelling - #1855

Merged
mergify[bot] merged 1 commit into
mainfrom
devs/jd/jd/mrgfy-9533-cli-find-the-mergify-configuration-under-the-yaml-extension/find-config-under-yaml-spelling--23d279e0
Sep 23, 2026
Merged

mergify[bot] merged 1 commit into
mainfrom
devs/jd/jd/mrgfy-9533-cli-find-the-mergify-configuration-under-the-yaml-extension/find-config-under-yaml-spelling--23d279e0

Conversation

@jd

@jd jd commented Sep 22, 2026

Copy link
Copy Markdown
Member

Pretty much every other YAML configuration file accepts the .yaml
extension; ours only ever looked for .yml, so a repository that
spells it .mergify.yaml read as "no configuration file" — in
mergify config validate, in config simulate, and in
mergify ci scopes.

The search list now carries both spellings at each of the three
conventional locations. The order is the existing location order,
with .yml ahead of .yaml at each location, and the first file
found still wins — so nothing moves for a repository that has one
file today.

A repository carrying more than one now gets a warning on stderr
naming the file in use and the ones ignored. That case was already
reachable (.mergify.yml next to .github/mergify.yml) and
silent; doubling the candidates makes it likely enough to be worth
saying out loud. An explicit --config-file never warns: the file
was named, nothing is being ignored.

ci scopes and the --config / --config-file help text each
kept their own copy of the list. They read the resolver's list now
— the help strings are built from DEFAULT_CONFIG_PATHS — so the
surfaces cannot drift apart again. The list's doc comment also
stops pointing at mergify_cli/ci/detector.py, which the Rust port
deleted.

The engine learns the same order in MRGFY-9532. Merging this is
safe at any time, but the next CLI release should wait until that
deploy is live: until then config validate would approve a
.yaml file that production still ignores.

MRGFY-9533
Fixes #1849

Co-Authored-By: Claude Opus 5 (1M context) noreply@anthropic.com

Pretty much every other YAML configuration file accepts the `.yaml`
extension; ours only ever looked for `.yml`, so a repository that
spells it `.mergify.yaml` read as "no configuration file" — in
`mergify config validate`, in `config simulate`, and in
`mergify ci scopes`.

The search list now carries both spellings at each of the three
conventional locations. The order is the existing location order,
with `.yml` ahead of `.yaml` at each location, and the first file
found still wins — so nothing moves for a repository that has one
file today.

A repository carrying more than one now gets a warning on stderr
naming the file in use and the ones ignored. That case was already
reachable (`.mergify.yml` next to `.github/mergify.yml`) and
silent; doubling the candidates makes it likely enough to be worth
saying out loud. An explicit `--config-file` never warns: the file
was named, nothing is being ignored.

`ci scopes` and the `--config` / `--config-file` help text each
kept their own copy of the list. They read the resolver's list now
— the help strings are built from `DEFAULT_CONFIG_PATHS` — so the
surfaces cannot drift apart again. The list's doc comment also
stops pointing at `mergify_cli/ci/detector.py`, which the Rust port
deleted.

The engine learns the same order in MRGFY-9532. Merging this is
safe at any time, but the next CLI *release* should wait until that
deploy is live: until then `config validate` would approve a
`.yaml` file that production still ignores.

MRGFY-9533
Fixes #1849

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Change-Id: I23d279e08b3ff851fd4397cec253b4e450cb91db
Copilot AI lite review requested due to automatic review settings September 22, 2026 20:36
@mergify
mergify Bot deployed to Mergify Merge Protections September 22, 2026 20:36 Active
@jd
jd deployed to func-tests-live September 22, 2026 20:36 — with GitHub Actions Active
@mergify

mergify Bot commented Sep 22, 2026 •

Copy link
Copy Markdown
Contributor

Merge Protections

🟢 All 6 merge protections satisfied — ready to merge.

Show 6 satisfied protections

🟢 🤖 Continuous Integration

  • all of:
    • check-success=ci-gate

🟢 👀 Review Requirements

  • any of:
    • #approved-reviews-by>=2
    • author = dependabot[bot]
    • author = mergify-ci-bot
    • author = renovate[bot]

🟢 Enforce conventional commit

Make sure that we follow https://www.conventionalcommits.org/en/v1.0.0/

  • title ~= ^(fix|feat|internal|docs|style|refactor|perf|test|build|ci|chore|revert|ui)(?:\(.+\))?!?:

🟢 🔎 Reviews

  • #changes-requested-reviews-by = 0
  • #review-requested = 0
  • #review-threads-unresolved = 0

🟢 📕 PR description

  • body ~= (?ms:.{48,})

🟢 🚦 Auto-queue

When all merge protections are satisfied, this pull request will be queued automatically.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot review overview

🟢 Approval recommended

No unresolved blocking issues were identified.

Review effort: Lite
Findings: None

What changed in this PR

Adds .yaml configuration discovery while preserving .yml precedence and warning about ignored files.

Changes:

  • Centralizes six candidate paths and resolution warnings.
  • Updates config commands, ci scopes, help text, snapshots, and documentation.
  • Adds resolver tests for detection and precedence.
File Summary
skills/​mergify-config/​SKILL.md Documents supported paths and precedence.
crates/​mergify-config/​src/​validate.rs Uses warning-aware resolution.
crates/​mergify-config/​src/​simulate.rs Uses warning-aware resolution.
crates/​mergify-config/​src/​paths.rs Implements shared resolution, warnings, and tests.
crates/​mergify-cli/​src/​snapshots/​mergify__tests__cli_schema_golden.snap Updates CLI schema snapshots.
crates/​mergify-cli/​src/​main.rs Builds help text from the shared path list.
crates/​mergify-ci/​src/​scopes_detect/​mod.rs Shares configuration discovery.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@mergify
mergify Bot requested a review from a team September 22, 2026 20:44
@jd
jd marked this pull request as ready for review September 22, 2026 20:57

@sileht sileht left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

We don't support .yaml yet.

@mergify
mergify Bot requested a review from a team September 22, 2026 21:02
@mergify
mergify Bot requested a review from a team September 22, 2026 21:05
@jd

jd commented Sep 22, 2026

Copy link
Copy Markdown
Member Author

Not yet, no — that is MRGFY-9532, queued right behind this one.

This PR only changes where the CLI looks on disk, so it can merge whenever. What has to wait is the release: until the engine deploy is live, mergify config validate would approve a .mergify.yaml that production still ignores. That constraint is in the commit message so it survives the merge rather than living in a review thread.

If you would rather this did not sit on main until the engine side lands, say so and I will hold it.

@mergify

mergify Bot commented Sep 23, 2026 •

Copy link
Copy Markdown
Contributor

Merge Queue Status

  • ✅ Entered queue — 2026-09-23 07:21 UTC · Rule: default · triggered by merge protections
  • ✅ Checks skipped · PR is already up-to-date
  • ✅ Merged — 2026-09-23 07:21 UTC · at b899f13f5666a3912e2a6e9055f39793481dd447 · squash

This pull request spent 9 seconds in the queue, including 1 second running CI.

Required conditions to merge

@mergify
mergify Bot merged commit b899f13 into main Sep 23, 2026
23 checks passed
@mergify
mergify Bot deleted the devs/jd/jd/mrgfy-9533-cli-find-the-mergify-configuration-under-the-yaml-extension/find-config-under-yaml-spelling--23d279e0 branch September 23, 2026 07:21

This branch was successfully deployed

2 active deployments
func-tests-live — c28aa737 Deployed Sep 22, 2026 by jd via live-tests #1945
Mergify Merge Protections — c28aa737 Deployed Sep 22, 2026 by mergify[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

Pretty much every other yaml configuration file I have allows for the .yaml extension.

5 participants