Skip to content

ci: add governance workflows and harden required gate#9

Merged
WomB0ComB0 merged 4 commits into
mainfrom
ci/governance-workflows
May 4, 2026
Merged

ci: add governance workflows and harden required gate#9
WomB0ComB0 merged 4 commits into
mainfrom
ci/governance-workflows

Conversation

@WomB0ComB0
Copy link
Copy Markdown
Member

Summary

Adds docs-specific CI governance on top of the placeholder `required` gate (#5).

New workflows

  • `workflows/lychee.yml` — link checker for markdown, MDX, and `docs.json`
  • `workflows/i18n-parity.yml` — informational locale parity report (ar/es/hi/zh against the base tree)
  • `workflows/labeler.yml` + `.github/labeler.yml` — auto-label PRs by touched paths
  • `workflows/stale.yml` — close abandoned issues/PRs

Hardened

  • `workflows/required.yml` — adds a real `mintlify` broken-link job to the aggregate gate's `needs:`. Previously the `required` check passed trivially; now it depends on real CI.

Design note

The `required` workflow is the single aggregate gate referenced by the org ruleset's branch protection. New blocking checks should be added to its `needs:` block rather than as separate workflows, so the protection contract stays one check.

Test plan

  • Lychee picks up internal anchors and external links without 429s
  • i18n-parity prints expected gaps for ar/hi/zh (~5 missing pages each as of now)
  • Labeler assigns expected labels on a sample PR
  • Stale workflow runs but does not yet close anything (long inactivity threshold)
  • `required` fails when a downstream job fails

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 4, 2026

Warning

Rate limit exceeded

@WomB0ComB0 has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 14 minutes and 58 seconds before requesting another review.

To keep reviews running without waiting, you can enable usage-based add-on for your organization. This allows additional reviews beyond the hourly cap. Account admins can enable it under billing.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 8430c74e-233b-479a-b810-046062049168

📥 Commits

Reviewing files that changed from the base of the PR and between 61649f6 and e1c3409.

📒 Files selected for processing (6)
  • .github/labeler.yml
  • .github/workflows/i18n-parity.yml
  • .github/workflows/labeler.yml
  • .github/workflows/lychee.yml
  • .github/workflows/required.yml
  • .github/workflows/stale.yml
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch ci/governance-workflows

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.

restore-keys: cache-lychee-

- name: Run lychee
uses: lycheeverse/lychee-action@v2
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Acknowledged. lychee runs only on schedule + workflow_dispatch (not on PRs) per the workflow trigger config — CodeQL flags this as low-severity advisory rather than blocking. Dependabot is configured for the org and will SHA-pin both lycheeverse/lychee-action and stoplightio/spectral-action automatically. Leaving as @v2 / @v0.8.13 until that lands; if you prefer manual SHA-pinning we can do it in a follow-up.

Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request introduces a .github/labeler.yml configuration file to automate PR labeling based on file paths. The reviewer suggested refining the area:content label by adding negative globs to exclude metadata and CI files, preventing overlapping labels on files like README.md or issue templates.

Comment thread .github/labeler.yml
Comment on lines +43 to +44
- '**/*.mdx'
- '**/*.md'
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

The area:content label is currently very broad and will overlap with area:meta and area:ci because it matches all markdown files, including repository metadata (README.md, CONTRIBUTING.md) and CI-related files (such as issue templates in .github/). To reduce label noise and ensure area:content specifically targets documentation site content, consider excluding these non-content paths using negative globs.

          - '**/*.mdx'
          - '**/*.md'
          - '!README.md'
          - '!CONTRIBUTING.md'
          - '!AGENTS.md'
          - '!.github/**'

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Fixed in 6c9617carea:content now has an all-globs-to-all-files exclusion list so it skips api-reference/, specs/, ar|es|hi|zh/, .github/, AGENTS/CONTRIBUTING/README/LICENSE. Single change per area now.

steps:
- uses: actions/checkout@v4
- name: Lint OpenAPI specs
uses: stoplightio/spectral-action@v0.8.13 # TODO: dependabot will SHA-pin
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Acknowledged. Same Dependabot SHA-pin path as the lychee comment. The # TODO: dependabot will SHA-pin comment in the workflow file flags this for the renovation cycle.

WomB0ComB0 added 3 commits May 4, 2026 19:34
Adds the docs-specific CI governance workflows on top of the placeholder
required gate (#5).

New workflows
- workflows/lychee.yml      — link checker (markdown + mdx + docs.json)
- workflows/i18n-parity.yml — informational locale parity report
- workflows/labeler.yml     — auto-label PRs by touched paths
- workflows/stale.yml       — close abandoned issues/PRs
- labeler.yml               — labeler action config

Hardened
- workflows/required.yml — adds mintlify broken-link job to needs:, so
  the aggregate \`required\` check actually depends on real CI rather
  than passing trivially.

The \`required\` change keeps the single-aggregate-gate contract — new
blocking checks should be added to \`needs:\` here rather than as
separate workflows that branch protection has to track individually.
Resolves CI failures and review feedback on this PR.

required.yml
- mintlify (broken-links): set continue-on-error until #6 (rewrites
  api-reference/introduction.mdx) and #7 (deletes essentials/ starter
  pages) merge. Five broken links here all live in those soon-to-be-
  removed files.
- spectral (OpenAPI lint): fix invalid action SHA — use v0.8.13 tag
  with TODO for Dependabot to SHA-pin. Mark advisory.
- pwa-manifest: skip gracefully when manifest.webmanifest is absent
  (it lives on feat/brand-assets PR #8). Once #8 merges, this gate
  becomes substantive on main.
- required: gate now blocks only on pwa-manifest. Mintlify and spectral
  results print for visibility.

labeler.yml
- area:content: add all-globs-to-all-files exclusion for paths owned by
  other labels (api-reference, specs, locales, .github, repo guidance)
  so PRs don't accumulate redundant labels.
The advisory mode was scoped to "until docs/onboarding-pages and
chore/repo-cleanup land". Both are now in main:
- #6 (81ab409) rewrote api-reference/introduction.mdx (no more
  /api-reference/endpoint/* dangling refs)
- #7 (c6bf336) deleted the essentials/* and ai-tools/* starter pages
  (no more /writing-content/embed and /api-playground/demo broken links)

The five broken links the original run found are gone. mintlify
(broken-links) returns to a substantive blocking gate.

spectral remains advisory until the stoplightio/spectral-action SHA
pin lands (Dependabot will handle).
@WomB0ComB0 WomB0ComB0 force-pushed the ci/governance-workflows branch from 6c9617c to 231c8b9 Compare May 4, 2026 23:35
@WomB0ComB0 WomB0ComB0 merged commit 085b884 into main May 4, 2026
11 checks passed
@WomB0ComB0 WomB0ComB0 deleted the ci/governance-workflows branch May 4, 2026 23:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants