Skip to content

ci: adopt the template's shared lint, CodeQL, CodeRabbit and Renovate config - #480

Merged
devantler merged 3 commits into
mainfrom
claude/adopt-shared-template-config
Nov 15, 2026
Merged

devantler merged 3 commits into
mainfrom
claude/adopt-shared-template-config

Conversation

@devantler

@devantler devantler commented Nov 15, 2026 •

Copy link
Copy Markdown
Contributor

What

Onboards this tenant onto the application template's shared configuration (monorepo ADR 0018, 2026-11-15 amendment; epic devantler-tech/monorepo#5062). It takes the template's current shared files, so the next template-sync is nearly empty:

  • Lint: .github/workflows/lint.yaml (MegaLinter cupcake, read-only) and .github/mega-linter.base.yml, .markdownlint.json, .yamllint.yml. A new megalinter job in ci.yaml calls it and counts towards CI - Required Checks. The existing lint job (ESLint) stays; MegaLinter leaves JavaScript and TypeScript to it.
  • Code scanning: .github/workflows/codeql.yaml (advanced setup, languages detected from the files). It stays off until the maintainer turns CodeQL default setup off and sets CODEQL_SETUP=advanced.
  • Review: .coderabbit.yaml, layered over the organization's settings.
  • Dependencies: renovate.json for the image tags in deploy/ only; Dependabot keeps everything else. It does nothing until the repository is enrolled in Renovate.
  • Synced workflows: release.yaml, template-sync.yaml, stale-issues.yaml and cd.yaml move to the template's content: the repository-ID guard and the devantler-tech/.github v21.6.2 callers. The publish-app pin is unchanged.
  • Overlays this tenant owns: .mega-linter.yml (extends the base) and .github/codeql/codeql-config.yml, both now in .templatesyncignore, with the template-only stacks/, scripts/scaffold.sh (+ test) and validate-stacks.yaml.

Nothing is diverged from: every shared file is taken as the template has it.

Fixes the first MegaLinter run asked for

  • .stylelintrc.json extends stylelint-config-standard and allows Tailwind v4's string @import and its at-rules (@theme, @source, @utility and the rest), which stylelint does not know.
  • src/app.css labels the theme's colour and font groups with comments, which keeps the blank line between them.
  • The Dockerfile HEALTHCHECK uses JSON notation (hadolint DL3025) and asks 127.0.0.1 instead of localhost: inside the image localhost resolves to ::1 first while the server listens on IPv4, so the old check was refused and the container never reported healthy. The runtime stage runs as USER 1000 (the same node user, by number, as deploy/ already sets) and the build stage runs build and prune in one RUN.

Validation

  • actionlint and zizmor clean on .github/workflows/; scripts/workflow-caller-pin-contract.test.sh passes.
  • stylelint passes on src/app.css with the new config (and still flags the original file, so the config is read); hadolint is clean. The image builds, serves GET /login 200 read-only with all capabilities dropped as UID 1000, reports healthy, and exits 0 on SIGTERM.
  • The new MegaLinter job runs in this PR's CI.

Maintainer-only switches

  • CodeQL: turn default setup off (Settings → Code security), then set the repository variable CODEQL_SETUP to advanced.
  • Renovate: enroll the repository.

🤖 Generated with Claude Code

devantler and others added 3 commits November 15, 2026 03:04
… config

Take the application template's current shared files so the next
template-sync is nearly empty, add the MegaLinter job to the required
checks, and add this tenant's overlays (.mega-linter.yml,
.github/codeql/codeql-config.yml) to .templatesyncignore with the
template-only scaffold and stacks.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
stylelint learns Tailwind v4's @import string and at-rules in a repo
.stylelintrc.json, the theme's two groups get comments instead of a bare
blank line, and the HEALTHCHECK uses JSON notation with the same shell
command.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The HEALTHCHECK asked for localhost, which resolves to ::1 inside the image
while the server listens on IPv4, so it was refused and the container
never reported healthy; ask 127.0.0.1. Also satisfy hadolint: the numeric
user (the node user, as deploy/ already runs it) and one build RUN.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@devantler

Copy link
Copy Markdown
Contributor Author

🤖 Generated by the Agentic Engineer

@coderabbitai full review

@coderabbitai

coderabbitai Bot commented Nov 15, 2026 •

Copy link
Copy Markdown
Action performed

Full review finished.

@coderabbitai

coderabbitai Bot commented Nov 15, 2026

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The pull request adds repository linting and CodeQL configuration, integrates MegaLinter into CI, and adds a conditional CodeQL workflow. It updates template ownership documentation, template-sync exclusions, and reusable workflow references. It also changes the Docker build instruction, health check target, and container user.

Possibly related PRs

Merge Risk: Minimal · up to 5e0db

This PR aligns the repository's shared lint, CodeQL, CodeRabbit and Renovate configuration with the template and updates the container health check and runtime user. No concrete defects were found. The repository-ID guard correctly identifies the template, and CodeQL stays off until maintainers enable it. It looks ready to merge once CI passes.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title names the main change: adopting the template's shared lint (MegaLinter), CodeQL, CodeRabbit and Renovate configuration. The changeset adds these files and workflows, and the title matches th…
Description check Passed The description is closely related to the changeset. It covers the new MegaLinter workflow and config, CodeQL advanced setup, CodeRabbit and Renovate config, synced workflow updates, tenant-owned over…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title names the main change: adopting the template's shared lint (MegaLinter), CodeQL, CodeRabbit and Renovate configuration. The changeset adds these files and workflows, and the title matches the PR objectives. It uses the conventional 'ci:' prefix and is one concise sentence.

Full details: Description check

Explanation

The description is closely related to the changeset. It covers the new MegaLinter workflow and config, CodeQL advanced setup, CodeRabbit and Renovate config, synced workflow updates, tenant-owned overlays, Dockerfile and Stylelint fixes, and validation steps. It also lists the maintainer-only switches.

Warning

Some tools did not complete. Review the errors below.

Biome (2.6.3)

src/app.css

File contains syntax errors that prevent linting: Line 3: Tailwind-specific syntax is disabled.

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

Recent review info

Run configuration

Commits

Reviewing files that changed from the base of the PR and between 8154eb5 and 5e0db28.

Files selected for processing: 19

  • .coderabbit.yaml
  • .github/codeql/codeql-config.yml
  • .github/mega-linter.base.yml
  • .github/workflows/cd.yaml
  • .github/workflows/ci.yaml
  • .github/workflows/codeql.yaml
  • .github/workflows/lint.yaml
  • .github/workflows/release.yaml
  • .github/workflows/stale-issues.yaml
  • .github/workflows/template-sync.yaml
  • .markdownlint.json
  • .mega-linter.yml
  • .stylelintrc.json
  • .templatesyncignore
  • .yamllint.yml
  • Dockerfile
  • docs/REFERENCE.md
  • renovate.json
  • src/app.css

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.

Recent review details

Context from checks skipped due to timeout: 1

  • GitHub Check: CodeRabbit
Additional context used

Code guidelines: 1

AGENTS.md — auto-discovered
Path-based instructions: 1

Source excerpt: Node.js 26 and npm 11 — one declared toolchain: `.node-version` (read by CI and version managers), the `node:` image in `Dockerfile`, and `engines.node` + `packageManager` in `package.json`.

CodeRabbit inference engine (AGENTS.md)

Files:

  • Dockerfile
Biome (2.6.3)

src/app.css

[error] 3-16: Tailwind-specific syntax is disabled.

(parse)

Additional comments: 1

.github/workflows/cd.yaml: 1

16-16: Functional Correctness

The comment's identity premises do not hold. Repository ID 1253884448 belongs to devantler-tech/platform-tenant-template. The repository devantler-tech/wedding-app has ID 1227898597. The publish guard therefore excludes the template and does not skip the application jobs in wedding-app.

@devantler
devantler marked this pull request as ready for review November 15, 2026 02:42
@devantler
devantler requested a review from a team as a code owner November 15, 2026 02:42
@devantler
devantler merged commit 940e942 into main Nov 15, 2026
32 checks passed
@devantler
devantler deleted the claude/adopt-shared-template-config branch November 15, 2026 02:42
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