Skip to content

docs(agent): fails the example check on a regex quoted inside an unquoted condition - #12721

Open
mergify-ci-bot wants to merge 1 commit into
Mergifyio:mainfrom
mergify-ci-bot:docs-agent/repo-34166099960
Open

mergify-ci-bot wants to merge 1 commit into
Mergifyio:mainfrom
mergify-ci-bot:docs-agent/repo-34166099960

Conversation

@mergify-ci-bot

Copy link
Copy Markdown
Contributor

scripts/validate-config-examples.mjs validates complete Mergify
configurations against the JSON schema, which sees a condition as a string and
so cannot tell a working one from a dead one. That left a whole class of broken
example invisible: - files ~= "^ui/" is valid YAML and a valid schema value,
but the quotes are part of the pattern, because YAML only strips quotes that
open a scalar and Mergify hands a ~= or *= value to the pattern engine
verbatim. The compiled pattern expects a literal double quote before a
start-of-string anchor and matches nothing, so the rule silently does nothing.
Two recipes in the merge-protections pages had it.

The check now also looks at every YAML block, not only the ones classified as
complete configurations, since most conditions in the docs live in fragments
showing a single rule. It flags a list item whose scalar is unquoted and whose
~= or *= value is wrapped in a matching pair of quotes. A condition the
author quoted as a whole is left alone, as is a pattern that merely contains a
quote, both covered by tests.

Open question: whether this belongs in the schema validator at all rather than
in a lint of its own. It lives here because this script already extracts and
classifies every YAML block in the corpus, and a second script would duplicate
that half; the cost is that a failure now reports as a config-example problem
when it is really a condition-language one, which is why the failure message
spells out the fix.

@mergify
mergify Bot deployed to Mergify Merge Protections September 7, 2026 22:41 Active
@mergify

mergify Bot commented Sep 7, 2026 •

Copy link
Copy Markdown
Contributor

Merge Protections

🟢 All 5 merge protections satisfied — ready to merge.

Show 5 satisfied protections

🟢 👀 Review Requirements

  • any of:
    • #approved-reviews-by >= 1
    • author = dependabot[bot]
    • author = renovate[bot]
    • all of:
      • -head ~= ^docs-agent/
      • author = mergify-ci-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.

@mergify

mergify Bot commented Sep 15, 2026

Copy link
Copy Markdown
Contributor

@mergify-ci-bot this pull request is now in conflict 😩

@mergify mergify Bot added the conflict label Sep 15, 2026

This branch was successfully deployed

1 active deployment
Mergify Merge Protections — 069f1613 Deployed Sep 7, 2026 by mergify[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Development

Successfully merging this pull request may close these issues.

2 participants