fix(api): sync the schemas and retire the badges reference with them - #12482
Conversation
The schema sync has been wedged since 2026-08-18. The upstream spec dropped the `badges` tag, but `src/content/navItems.tsx` still linked `/api/badges`, so the sidebar pointed at a route that no longer generates. The build guard from #12398 caught that correctly, and the sync pull request has been red ever since — three days of schema changes piled onto one blocked branch, with nothing reaching the site. This lands the synced content together with the docs-side edits the tag removal needs, so the two halves are never apart: - `public/api-schemas.json` loses the badge endpoints, and `public/mergify-configuration-schema.json` picks up the widened `random_count` weight range (1 to 65535). - The `Badges` sidebar entry goes, with the tag's label and description in `openapi.ts` — nothing generates that page anymore. - `/api/badges` redirects to the API reference index. The badge API has no successor page, but the sidebar linked that URL from every page of the site, so a 301 to the closest parent beats a 404. MRGFY-8814 Change-Id: I9a0e39bb3fd25757defd375fefc9b4b96b41e787
|
This pull request is part of a Mergify stack:
|
Merge Protections🔴 2 of 6 protections blocking · waiting on 👀 reviews
🔴 👀 Review RequirementsWaiting for
This rule is failing.
🔴 🔎 ReviewsWaiting for
This rule is failing.
Show 4 satisfied protections🟢 🤖 Continuous Integration
🟢 Enforce conventional commitMake sure that we follow https://www.conventionalcommits.org/en/v1.0.0/
🟢 📕 PR description
🟢 🚦 Auto-queueWhen all merge protections are satisfied, this pull request will be queued automatically. |
There was a problem hiding this comment.
Pull request overview
Syncs the docs site with the latest upstream API/config schemas and removes the now-defunct “Badges” API reference entry so navigation and generated /api/* pages stay consistent and the build/link guard can pass again.
Changes:
- Removes the
/api/badgessidebar entry and drops thebadgestag label/description used for API reference headings. - Updates synced schema artifacts: OpenAPI spec content (including removing badge endpoints) and the configuration schema’s
random_countweight range description. - Adds redirects for
/api/badgesto the API reference index to avoid a site-wide 404.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| src/content/navItems.tsx | Removes the “Badges” API sidebar link so nav no longer points at a non-generated page. |
| src/components/ApiReference/openapi.ts | Removes badges from tag label/description mappings to match the upstream tag removal. |
| public/mergify-configuration-schema.json | Syncs config schema text to the updated random_count weight range. |
| public/api-schemas.json | Syncs OpenAPI schema, removing badge endpoints and updating pagination/link header documentation. |
| public/_redirects | Redirects /api/badges to /api/ to prevent a 404 for the retired docs route. |
Suppressed comments (1)
public/api-schemas.json:6237
- The
Linkheader example hard-codes a specific org/repo (Mergifyio/mergify-engine). Consider using{owner}/{repository}placeholders so the shipped schema stays generic and doesn't point to a specific repository.
"description": "Pagination links (rfc5988). `next` and `prev` are each present only when there is a page to go to, so a response with nothing before or after it carries no `Link` header at all. To return to the first page, call the endpoint again without a `cursor`.",
"example": "Link: <https://api.mergify.com/v1/repos/Mergifyio/mergify-engine/logs?cursor=def&per_page=20>; rel=\"next\",\n <https://api.mergify.com/v1/repos/Mergifyio/mergify-engine/logs?cursor=abc&per_page=20>; rel=\"prev\"",
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
The schema sync has been wedged since 2026-08-18. The upstream spec dropped
the
badgestag, butsrc/content/navItems.tsxstill linked/api/badges,so the sidebar pointed at a route that no longer generates. The build guard
from #12398 caught that correctly, and the sync pull request has been red ever
since — three days of schema changes piled onto one blocked branch, with
nothing reaching the site.
This lands the synced content together with the docs-side edits the tag
removal needs, so the two halves are never apart:
public/api-schemas.jsonloses the badge endpoints, andpublic/mergify-configuration-schema.jsonpicks up the widenedrandom_countweight range (1 to 65535).Badgessidebar entry goes, with the tag's label and description inopenapi.ts— nothing generates that page anymore./api/badgesredirects to the API reference index. The badge API has nosuccessor page, but the sidebar linked that URL from every page of the site,
so a 301 to the closest parent beats a 404.
MRGFY-8814