From 50413aa215786fc76c115e5d9189b6210519a465 Mon Sep 17 00:00:00 2001 From: Bryan Fawcett Date: Sat, 12 Sep 2026 03:14:13 +0800 Subject: [PATCH] ci: make the lint caller and configs byte-identical to nyuchi/.github This repo already published the five required contexts, but three of the files behind them were local variants: .prettierignore, .yamllint.yaml and .markdownlint.jsonc carried a mukoko-dev header and had not picked up the two most recent canonical changes. - lint.yml gains a `merge_group:` trigger, so the five required checks also report on the gh-readonly-queue/** ref where a ruleset uses a merge queue. Harmless where there is no queue. - .yamllint.yaml now ignores lockfiles, matching .prettierignore. - .prettierignore picks up CODEOWNERS.example and profile/governance/. - .markdownlint.jsonc differs only in its header comment; no rule changed. Divergent copies are the problem this file set exists to end, so the org's own .github repo should be the last place to carry one. Co-Authored-By: Claude Opus 5 (1M context) --- .github/workflows/lint.yml | 53 +++++++++++++++++++++++++------------- .markdownlint.jsonc | 2 +- .prettierignore | 10 ++++++- .yamllint.yaml | 14 +++++++++- 4 files changed, 58 insertions(+), 21 deletions(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index e372190..5e71cb6 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -1,37 +1,54 @@ -# Lint CI for mukoko-dev/.github. +# The org-wide lint gate. Drop this file in as +# .github/workflows/lint.yml and change nothing else. # -# Calls the shared lint workflow in nyuchi/.github. That repository is -# public, so a reusable workflow in it can be called from any repository -# in any organisation — including private ones. This is the same wiring -# bundu-labs and mzizi-dev already use, and it is deliberate: the org's -# lint policy lives in exactly one place and is not copied per org. +# The five checks it publishes are exactly the five contexts the +# org ruleset requires: # -# The job MUST be called `lint`. A reusable-workflow call publishes its -# checks as "/", which is what produces the five -# contexts the mukoko-dev org ruleset requires: -# -# lint / actionlint lint / markdownlint -# lint / JSON validity lint / yamllint +# lint / actionlint +# lint / JSON validity # lint / prettier +# lint / markdownlint +# lint / yamllint +# +# Those strings come from the job being called `lint` and calling a +# reusable workflow - a check publishes as " / ". +# Do NOT convert this to a matrix: a matrix publishes +# "lint (actionlint)" instead and will not satisfy the ruleset. # -# Every repository in this org needs a file exactly like this one, or its -# PRs can never merge. +# Also copy .prettierrc, .prettierignore, .markdownlint.jsonc and +# .yamllint.yaml from nyuchi/.github into your repo root. 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: -permissions: - contents: read - concurrency: group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: ${{ github.event_name == 'pull_request' }} +permissions: + contents: read + jobs: lint: uses: nyuchi/.github/.github/workflows/reusable-lint.yml@main diff --git a/.markdownlint.jsonc b/.markdownlint.jsonc index fc3a0ce..1a3974c 100644 --- a/.markdownlint.jsonc +++ b/.markdownlint.jsonc @@ -1,4 +1,4 @@ -// markdownlint-cli2 config for mukoko-dev/.github. +// markdownlint-cli2 config for nyuchi/.github. // // Relaxed defaults that accommodate: // - Long prose lines in docs (we format for readability, not width) diff --git a/.prettierignore b/.prettierignore index 176e105..b8d69cf 100644 --- a/.prettierignore +++ b/.prettierignore @@ -1,4 +1,4 @@ -# Prettier ignore for mukoko-dev/.github. +# Prettier ignore for nyuchi/.github. # Standard ignores node_modules/ @@ -7,6 +7,7 @@ node_modules/ # Files with structural meaning that Prettier would harm LICENSE CODEOWNERS +CODEOWNERS.example .github/CODEOWNERS # YAML is handled by yamllint and actionlint, not Prettier — they have @@ -15,6 +16,13 @@ CODEOWNERS *.yml *.yaml +# Governance documents are authored by the Founder as legal / formal +# documents. Prettier's markdown formatter reflows numbered paragraphs +# ("2.2 The company pursues...") after a list as loose list-item +# continuations, which corrupts the document's structure. Hand-format +# these files. +profile/governance/ + # Lockfiles, generated output *-lock.json *-lock.yaml diff --git a/.yamllint.yaml b/.yamllint.yaml index 702213a..dc117fc 100644 --- a/.yamllint.yaml +++ b/.yamllint.yaml @@ -1,4 +1,4 @@ -# yamllint config for mukoko-dev/.github. +# yamllint config for nyuchi/.github. # # Relaxed defaults that accommodate: # - GitHub Actions workflows (which use `on:` — a YAML 1.1 boolean) @@ -11,6 +11,18 @@ 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 rules: # 140-char limit. Workflow files have legitimately long shell URLs