From be9026638dd26546c26dad03aa18b4873e79ed2a Mon Sep 17 00:00:00 2001 From: Bryan Fawcett Date: Sat, 12 Sep 2026 04:07:05 +0800 Subject: [PATCH] ci(lint): normalise the lint gate to current canon Config-only. Brings this repo's caller and lint configs byte-identical to nyuchi/.github, closing drift that accumulated while canon was fixed underneath the rollout. What moved, and why it moved: - the caller gains `merge_group:`, which a repo whose ruleset uses a merge queue needs - required checks must report on the gh-readonly-queue/** ref and only merge_group produces that. Inert where there is no queue. - the caller's push trigger becomes [main, master, scaffold], every default-branch name in the estate. Four repos do not default to `main`, and there merging fired no workflow at all. - .yamllint.yaml gains the generated-file exemptions: lockfiles, whose registry deprecation strings no developer wrote and cannot rewrap, and Rails test/fixtures/, which are ERB templates and only become YAML after Rails renders them. No behaviour change here beyond those. The point is that "identical in every repo" is checkable rather than aspirational. Co-Authored-By: Claude Opus 5 (1M context) --- .github/workflows/lint.yml | 18 +++++++++++++++++- .yamllint.yaml | 25 +++++++++++++++++++++++++ 2 files changed, 42 insertions(+), 1 deletion(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index f766bb6..5e71cb6 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -23,7 +23,23 @@ name: Lint on: pull_request: push: - branches: [main] + # Every default-branch name in the estate: `main` covers 68 repos, + # `master` covers siafudb-kuzu, `scaffold` covers shamwari-core, + # shamwari-gateway and shamwari-web. Drop a name and merging to that + # repo's default branch fires nothing, so the five contexts never + # land on the default-branch head - which is how `lint / prettier` + # stayed red in bundu-labs/.github from 2026-05-02 unnoticed. + # + # A list rather than a bare `push:`, because unfiltered push would + # run the gate on every feature-branch push in 74 repos and bill it + # twice per PR. Add a name here if a repo ever adopts a fourth. + branches: [main, master, scaffold] + # Required for repos whose ruleset uses a MERGE QUEUE: required checks + # must report on the gh-readonly-queue/** ref, and only merge_group + # produces that. Without it a queued PR stalls for the full + # check_response_timeout and nothing can ever land. Harmless where + # there is no queue, so it stays in the one identical caller. + merge_group: workflow_dispatch: concurrency: diff --git a/.yamllint.yaml b/.yamllint.yaml index a280c3e..61cc7b6 100644 --- a/.yamllint.yaml +++ b/.yamllint.yaml @@ -11,6 +11,31 @@ extends: default ignore: | node_modules/ + # Lockfiles are generated, not authored. .prettierignore already + # exempts them under "Lockfiles, generated output"; yamllint not doing + # the same was an oversight that only stayed hidden because this repo + # has no lockfile. pnpm writes registry deprecation notices verbatim + # into pnpm-lock.yaml, which routinely exceeds the 140-char limit and + # cannot be rewrapped without invalidating the lockfile. + pnpm-lock.yaml + package-lock.json + yarn.lock + **/pnpm-lock.yaml + **/package-lock.json + **/yarn.lock + + # Rails fixtures are ERB TEMPLATES, not YAML documents. campfire's + # test/fixtures/users.yml opens with + # <% password_digest = BCrypt::Password.create("secret123456") %> + # and only becomes valid YAML after Rails renders it, so yamllint + # reports a hard syntax error and always will. The ActionText fixtures + # alongside them are HTML blobs that tests assert on byte-for-byte, so + # rewrapping their long lines would be a test change, not a formatting + # change. Seven files in that repo are ERB-templated YAML; the others + # only parse because their ERB happens to sit inside quoted scalars, + # which is luck rather than correctness. + test/fixtures/ + **/test/fixtures/ rules: # 140-char limit. Workflow files have legitimately long shell URLs