chore(ci): data/release gates, CodeQL, dependency review, dev container - #772
Merged
Conversation
…tooling Repo-specific gates: - scripts/check_translations.py + "Translation parity" job — fails the build if any locale's key set differs from en.json, in both the HA translations catalogue and the card/panel locales - scripts/check_data_files.py + "Data files" job — parses every shipped blueprint, custom sentence, locale and metadata file, and cross-checks manifest/hacs packaging fields - scripts/check_release.py + release-guard.yml — asserts manifest.json's version equals the release tag exactly, and that taskmate.zip actually landed on the release (HACS installs break without it) Security and supply chain: - codeql.yml — Python + JavaScript analysis on push/PR and weekly - dependency-review.yml — blocks PRs introducing a vulnerable dependency - workflow-lint.yml — actionlint + zizmor audit of the CI config itself - fixed the findings that audit surfaced: template injection via the release tag in release-zip.yml, and persist-credentials on every checkout - dependabot: 7/14-day cooldown on new releases, plus a pip entry so a newer test-harness pin surfaces as one PR a month instead of never CI quality and speed: - pip and npm dependency caching (the HA harness install was the slow step) - pytest-cov with a per-module coverage table in the job summary and an HTML report artifact - dropped the duplicate hassfest job from tests.yml (hassfest.yaml already runs it on every push/PR) - ruff now covers scripts/ too Contributor experience: - .devcontainer — Codespaces/VS Code container that installs the toolchain and creates a scratch HA config with the integration symlinked in - .pre-commit-config.yaml (+ pre-commit.ci) running ruff, the data checks, ESLint and whitespace hygiene - .github/CODEOWNERS and .github/release.yml (label-grouped generated notes) - CONTRIBUTING.md documents all of it; README gains the new status badges
Advanced CodeQL configurations can't upload results while GitHub's default setup is configured, so both Analyze jobs failed. The repo already scans actions, javascript-typescript and python via default setup; its query suite has been raised from 'default' to 'extended' instead, which is what the workflow was adding.
This was referenced Aug 10, 2026
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds the CI/tooling items agreed in this session — everything except the repo-wide
ruff formatsweep, which follows in its own PR so the reformat noise stays isolated.Repo-specific gates
scripts/check_translations.py)en.jsonin either catalogue (386 backend keys, 1739 card/panel keys). Currently all 14 locale files pass key-for-key.scripts/check_data_files.py)manifest.jsonrequired fields and thehacs.jsonzip_release/filenamepairing.scripts/check_release.py+release-guard.yml)manifest.jsonversion does not equal the tag exactly (including-beta.N), and a release missingtaskmate.zip— which makes it uninstallable via HACS. Polls for the asset so it does not racerelease-zip.yml.Security and supply chain
security-and-qualityqueries, on push/PR and weekly. Findings land in the Security tab; not a merge gate.actionlint+zizmoron the CI config itself, path-filtered to.github/**.release-zip.yml(the release tag was expanded inline into arun:block; now passed via env), andpersist-credentials: falseon all eight checkouts.pipentry (monthly, limit 1) so a newer test-harness pin surfaces as a decision instead of never being noticed. The deliberate pin itself is untouched.CI quality and speed
pytest-cov: a per-module coverage table written into the job summary (worst-covered first) and an HTML report uploaded as an artifact. Baseline is ~20% overall.hassfestjob fromtests.yml—hassfest.yamlalready runs it on every push and PR, so it was running twice per PR for no extra signal.ruff checknow coversscripts/as well.Contributor experience
.devcontainer/— Codespaces / VS Code container that installs the toolchain and builds a scratch HA config atdev-config/with the integration symlinked in, sohass -c dev-configruns a real HA against the working copy..pre-commit-config.yaml+ pre-commit.ci — ruff, the two data checks, ESLint, and whitespace hygiene..github/CODEOWNERS— auto-requests review, including on fork PRs..github/release.yml— groups the generated "What's Changed" list by label so dependency bumps collapse into one section. Does not replace hand-written notes.CONTRIBUTING.mddocuments all local commands; README gains Data checks / CodeQL / pre-commit.ci badges.Diff noise, explained
README.mdshows ~700 changed lines and two issue templates changed — all of it trailing-whitespace stripping, required for the whitespace hooks to pass.git diff -won those files is empty. One missing final newline added totaskmate-child-card.js.Needs your click (cannot be done from the API)
Translation parityandData filesas required checks if you want them to gate merges (the PAT gets 403 on rulesets).Verified locally
actionlint— cleanzizmor --persona regular --min-severity medium .— no findings (was 1 high + 10 medium)ruff check custom_components/taskmate tests scripts— cleanpython3 scripts/check_translations.py— pass, all 14 localespython3 scripts/check_data_files.py— passpytest --cov— coverage flags and the summary renderer both work