Skip to content

renovate: extend org default - #1

Merged
cewert merged 5 commits into
mainfrom
renovate/extend-org-default
May 21, 2026
Merged

renovate: extend org default#1
cewert merged 5 commits into
mainfrom
renovate/extend-org-default

Conversation

@cewert

@cewert cewert commented May 21, 2026

Copy link
Copy Markdown
Member

Summary

Started as a one-line renovate.json (extend org default). Grew during review because PR-triggered CI flushed out two pre-existing latent bugs that needed fixing for patch automerge to be safe here.

5 commits:

  1. renovate: extend org default — the original one-liner.
  2. fix: inject Starlight title: into existing frontmatter blocksfetch-docs.mjs's copyMarkdownWithFrontmatter bailed when any frontmatter existed. jellyrock docs use topic: not title:, but Starlight's docsSchema requires title:astro check blew up. Fix: three cases (no frontmatter / frontmatter-without-title / frontmatter-with-title). Latent since the CI workflow shipped — main only runs astro build (lenient), the CI's astro check had never run because there were no prior PRs.
  3. style: prettier formattingrenovate.json + the script change above didn't match the repo's prettier settings.
  4. docs: register BrightScript Shiki grammar — jellyrock docs have 117 ```brighterscript code blocks across 8 files; without a registered grammar astro-expressive-code logs a WARN for every block and falls back to plain text. Vendor the MIT-licensed TextMate grammar from rokucommunity/vscode-brightscript-language@v2.65.0 into dev-docs/src/syntaxes/; register via Starlight's expressiveCode.shiki option; alias brighterscript and bs to it.
  5. ci: auto-sync the vendored brightscript grammar — closes the loop on (4). Renovate watches dev-docs/src/syntaxes/.version-info and bumps the upstream ref; a new GitHub Actions workflow (sync-brightscript-grammar.yml) re-fetches the grammar JSON from the bumped tag and commits to the PR branch. Single review/merge updates both files atomically. (Hosted Renovate's free tier doesn't run postUpgradeTasks, so the workflow substitutes.) Also adds .vscode/settings.json so the IDE stops mis-detecting .prettierignore and .version-info as markdown.

Part of

  1. ✅ github-runner: add PR CI
  2. ✅ infra: add CI + renovate.json + group_vars annotations
  3. docs: renovate.json + brighterscript grammar + frontmatter fix ← this PR
  4. jellyrock.app: add renovate.json
  5. shared-ui: add renovate.json
  6. .github: promote org default + SOP README
  7. jellyrock: remove duplicates

Test plan

  • check job passes (astro/eslint/prettier)
  • sync workflow is a no-op when .version-info isn't touched (verified on this PR)
  • After merge: confirm Renovate's first scan creates the customManagers entry for rokucommunity/vscode-brightscript-language (visible in Renovate's dashboard / dry-run output)
  • First real auto-sync cycle: when upstream cuts v2.66.0, Renovate opens a PR bumping .version-info, the sync workflow re-fetches the grammar, both land together

cewert added 3 commits May 21, 2026 12:08
Wires this repo up to Renovate via the shared jellyrock org config
(jellyrock/.github//renovate/default). Part of the org-wide Renovate
consolidation — no repo-specific overrides needed; ESLint/Prettier
grouping, patch automerge gating, weekly minor/major schedule, and
Docker digest pinning will all land via the org default (PR 6 in
the rollout sequence).

PR-triggered CI (.github/workflows/ci.yml) already covers
`npm run check` (astro/tsc + eslint + prettier), which gates
the patch automerge that the org default will enable.
Pre-existing bug uncovered when CI ran on a PR for the first time
(no PRs had been opened against this repo before today, and the CI
workflow only triggers on PRs — push to main runs the Deploy workflow
which calls astro build, not astro check).

copyMarkdownWithFrontmatter() had a "skip if frontmatter already
exists" early-return. That blew up against jellyrock/docs/dev/*.md
which now have topic:/related-files:/last-reviewed: frontmatter but
no title: — Starlight's docsSchema requires title.

Restructure into three cases:
  1. No frontmatter      → synthesize one from H1 / html h1 / filename
  2. Frontmatter without title: → inject title; preserve everything else
  3. Frontmatter with title:    → pass through unchanged

H1 is still stripped from the body when used as the title source so
Starlight doesn't render the heading twice.

Verified locally: astro check now reports 0 errors / 0 warnings /
0 hints across 11 dev-docs files.
Pure formatting; no logic change. Caught by check:prettier on CI.
@cewert
cewert force-pushed the renovate/extend-org-default branch from d824f12 to d448838 Compare May 21, 2026 16:22
cewert added 2 commits May 21, 2026 12:34
jellyrock/docs/dev/*.md contains 117 ```brighterscript code blocks
across 8 files (the project's primary language). Without a registered
grammar, astro-expressive-code logs a WARN for every block and falls
back to plain-text rendering.

Vendor the upstream TextMate grammar from rokucommunity (MIT-licensed,
single JSON file, 43 KB) and register it via Starlight's
expressiveCode.shiki option. The grammar's scope is source.brs and
covers both .bs and .brs file types; alias \`brighterscript\` and \`bs\`
fence labels to it.

Files:
- dev-docs/src/syntaxes/brightscript.tmLanguage.json: vendored grammar
  from rokucommunity/vscode-brightscript-language@v2.65.0
- dev-docs/src/syntaxes/.version-info: tracking annotation for Renovate
  (the sync workflow added in the next commit re-fetches the grammar
  when the ref bumps, so a single review/merge updates both files)
- dev-docs/astro.config.mjs: load grammar, register langAlias
- .prettierignore: exclude src/syntaxes/ so vendored upstream content
  keeps its original formatting through prettier --check

Verified locally: npm run check passes, brighterscript code blocks now
highlight properly with no expressive-code warnings.
Closes the loop on grammar vendoring. Without this, the previous
commit's vendored JSON would silently drift from upstream until
someone manually re-fetched.

How it works:
1. Renovate scans dev-docs/src/syntaxes/.version-info (see new
   customManagers entry in renovate.json) and opens a PR bumping
   `ref: v2.65.0` → `ref: vX.Y.Z` when a new release of
   rokucommunity/vscode-brightscript-language ships.
2. The PR's path trigger fires sync-brightscript-grammar.yml.
3. The workflow re-fetches brightscript.tmLanguage.json from the
   new tag (raw.githubusercontent.com) and commits the updated
   JSON to the PR branch.
4. Both files are reviewed and merged together — atomic update.

Hosted Renovate's free tier doesn't run postUpgradeTasks, so the
classic "Renovate + run a script" pattern isn't available. A
GitHub Actions workflow triggered by Renovate's PR is the
substitute.

Bumps don't automerge (per renovate.json packageRule): humans
review the upstream release notes before adopting — grammar
changes can subtly affect highlighting across 117 code blocks.

Also: add .vscode/settings.json with files.associations for
dotfiles whose first '#' line trips the markdownlint extension
(.prettierignore → ignore, .version-info → yaml). One-time
annoyance fix; eliminates the false-positive lint warnings in
the IDE without affecting any actual tooling behavior.
@cewert
cewert merged commit 89a6b45 into main May 21, 2026
2 checks passed
@cewert
cewert deleted the renovate/extend-org-default branch May 21, 2026 16:46
cewert added a commit to jellyrock/github-runner that referenced this pull request May 21, 2026
The IDE's markdownlint extension flags dotfiles whose first line happens
to start with '#' (gitignore/properties comments) or '---' (YAML start)
as malformed markdown. None of those are markdown; the fix is a one-
line files.associations entry per dotfile that's affected in this repo.

Pure IDE config change — zero effect on CI, build, or runtime.
Matches the pattern landed in jellyrock/docs#1.
cewert added a commit to jellyrock/shared-ui that referenced this pull request May 21, 2026
The IDE's markdownlint extension flags dotfiles whose first line happens
to start with '#' (gitignore/properties comments) or '---' (YAML start)
as malformed markdown. None of those are markdown; the fix is a one-
line files.associations entry per dotfile that's affected in this repo.

Pure IDE config change — zero effect on CI, build, or runtime.
Matches the pattern landed in jellyrock/docs#1.
cewert added a commit to jellyrock/github-runner that referenced this pull request May 29, 2026
The IDE's markdownlint extension flags dotfiles whose first line happens
to start with '#' (gitignore/properties comments) or '---' (YAML start)
as malformed markdown. None of those are markdown; the fix is a one-
line files.associations entry per dotfile that's affected in this repo.

Pure IDE config change — zero effect on CI, build, or runtime.
Matches the pattern landed in jellyrock/docs#1.
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.

1 participant