Skip to content

fix(api): sync the schemas and retire the badges reference with them - #12482

Draft
jd wants to merge 1 commit into
mainfrom
devs/jd/jd/mrgfy-8814-docs-schema-sync-pr-wedges-whenever-an-api-tag-is-removed/sync-schemas-retire-badges-ref-them--9a0e39bb
Draft

fix(api): sync the schemas and retire the badges reference with them#12482
jd wants to merge 1 commit into
mainfrom
devs/jd/jd/mrgfy-8814-docs-schema-sync-pr-wedges-whenever-an-api-tag-is-removed/sync-schemas-retire-badges-ref-them--9a0e39bb

Conversation

@jd

@jd jd commented Aug 21, 2026

Copy link
Copy Markdown
Member

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

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
Copilot AI lite review requested due to automatic review settings August 21, 2026 15:15
@jd

jd commented Aug 21, 2026

Copy link
Copy Markdown
Member Author

This pull request is part of a Mergify stack:

# Pull Request Link
1 fix(api): sync the schemas and retire the badges reference with them #12482 👈
2 feat(ci): say when the schema sync has not landed #12483

@mergify
mergify Bot had a problem deploying to Mergify Merge Protections August 21, 2026 15:15 Failure
@mergify

mergify Bot commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

Merge Protections

🔴 2 of 6 protections blocking · waiting on 👀 reviews

Protection Waiting on
🔴 👀 Review Requirements 👀 reviews
🔴 🔎 Reviews 👀 reviews
🟢 🤖 Continuous Integration
🟢 Enforce conventional commit
🟢 📕 PR description
🟢 🚦 Auto-queue

🔴 👀 Review Requirements

Waiting for

  • #approved-reviews-by >= 2
This rule is failing.
  • any of:
    • #approved-reviews-by >= 2
    • author = dependabot[bot]
    • all of:
      • author = mergify-ci-bot
      • -head ~= ^docs-agent/

🔴 🔎 Reviews

Waiting for

  • #review-requested = 0
This rule is failing.
  • #review-requested = 0
  • #changes-requested-reviews-by = 0
  • #review-threads-unresolved = 0

Show 4 satisfied protections

🟢 🤖 Continuous Integration

  • all of:
    • check-success = build
    • check-success = lint
    • check-success = test
    • any of:
      • check-success = test-broken-links
      • label = ignore-broken-links
    • any of:
      • check-success=Cloudflare Pages
      • -head-repo-full-name~=^Mergifyio/

🟢 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)(?:\(.+\))?!?:

🟢 📕 PR description

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

🟢 🚦 Auto-queue

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

@mergify
mergify Bot requested a review from a team August 21, 2026 15:17

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.

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/badges sidebar entry and drops the badges tag label/description used for API reference headings.
  • Updates synced schema artifacts: OpenAPI spec content (including removing badge endpoints) and the configuration schema’s random_count weight range description.
  • Adds redirects for /api/badges to 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 Link header 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.

Comment thread public/api-schemas.json
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.

2 participants