From 53924538ba25f928e2622e76c613adc9350a04d2 Mon Sep 17 00:00:00 2001 From: Matt Edmondson Date: Wed, 16 Sep 2026 11:03:49 +0000 Subject: [PATCH] Keep the Status column showing through the CI migration KtsuBuild reads the profile Status column from one workflow file by name, and that name is moving from `dotnet.yml` to `ci.yml` so the badge follows a repository whatever pipeline `ci-shared.yml` dispatches it to. Repositories migrate one at a time, so for the length of the rollout both shapes exist at once. `--fallback-workflow dotnet.yml` covers that window: a repository with no `ci.yml` still gets a status, and the run logs a warning naming it. The flag comes off when the warnings stop, which makes the rollout's own progress the signal for retiring it. The flag is accepted by the published tool as well, where it is never consulted because `dotnet.yml` is still primary there, so this is correct both before and after KtsuBuild ships the change. Co-Authored-By: Claude Opus 5 Claude-Session: https://claude.ai/code/session_014RABe2NufFc9hwm94iB3Rf --- .github/workflows/update-readme.yml | 7 +++++++ CLAUDE.md | 11 +++++++++-- docs/shared-ci.md | 16 ++++++++++++++++ 3 files changed, 32 insertions(+), 2 deletions(-) diff --git a/.github/workflows/update-readme.yml b/.github/workflows/update-readme.yml index dc87282..873e6c1 100644 --- a/.github/workflows/update-readme.yml +++ b/.github/workflows/update-readme.yml @@ -40,6 +40,12 @@ jobs: run: dotnet tool install ktsu.KtsuBuild.Tool --tool-path ./.ktsubuild # The tool reads the GitHub API through the gh CLI, which is preinstalled on the runner. + # + # The Status column keys on `ci.yml`, the caller every repository uses to reach the shared + # pipeline. `--fallback-workflow dotnet.yml` keeps a status showing for the repositories that + # have not been moved over yet, and logs a warning naming each one, so the flag comes off by + # itself once the warnings stop. It is accepted by the published tool as well, where it is + # simply never consulted, so this runs correctly whichever version is installed. - name: Generate Readme env: GH_TOKEN: ${{ github.token }} @@ -47,6 +53,7 @@ jobs: ./.ktsubuild/ktsubuild profile readme --org ktsu-dev --exclude Sdk + --fallback-workflow dotnet.yml --template ./profile/README.template --output ./profile/README.md diff --git a/CLAUDE.md b/CLAUDE.md index a0c857d..909efb7 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -21,7 +21,7 @@ The profile README is generated by KtsuBuild, not by a script in this repository ```bash dotnet tool install ktsu.KtsuBuild.Tool --tool-path ./.ktsubuild -./.ktsubuild/ktsubuild profile readme --org ktsu-dev --exclude Sdk +./.ktsubuild/ktsubuild profile readme --org ktsu-dev --exclude Sdk --fallback-workflow dotnet.yml ``` The command reads every public repository in the organization, appends a table to @@ -34,6 +34,7 @@ The table carries Repo, Ships, Stable, SDK, Stars, Activity, and Status. Useful while iterating: - `--only ` limits the run to one repository, which takes seconds rather than minutes - `--verbose` reports the primary projects and lookups behind each row +- `--fallback-workflow dotnet.yml` is the migration crutch described below, not a permanent flag The source lives in `KtsuBuild/Profile/` in the [KtsuBuild](https://github.com/ktsu-dev/KtsuBuild) repository. Change the generator there, not here. @@ -45,11 +46,17 @@ breaks one of these, fix the repository rather than teaching the generator about | Convention | What breaks without it | |------------|------------------------| -| The build workflow is named `dotnet.yml` | The Status column is blank | +| The repository calls the shared pipeline through `ci.yml` | The Status column is blank | | Projects are named `.csproj`, `.App`, `.ConsoleApp`, `.Tool`, `.Test` | Nothing directly, but the naming is what makes a repository readable | | Demos, samples, examples, benchmarks, and tests are named for what they are, or live under `examples/`, `samples/`, `benchmarks/`, `tests/` | The Ships column claims deliverables the repository does not ship | | `global.json` pins `ktsu.Sdk` | The SDK column is blank | +The Status column reads `ci.yml` rather than the pipeline it dispatches to, which is what lets +`ci-shared.yml` grow new languages and visibilities without the generator learning about any of +them. While repositories are still being moved onto the shared pipeline, `--fallback-workflow +dotnet.yml` keeps their status showing and logs a warning naming each one still to move. The flag +comes off once the warnings stop; it is a migration crutch, not part of the convention. + Known violations, each of which wants a fix in its own repository: - **Schema** ships `SchemaEditor` and `SchemaTool`, which should be `Schema.Editor` and `Schema.Tool` - **ThemeProvider** ships `ThemeProvider.Analysis`, an application at the repository root. Decide diff --git a/docs/shared-ci.md b/docs/shared-ci.md index a37e055..b6190e0 100644 --- a/docs/shared-ci.md +++ b/docs/shared-ci.md @@ -169,6 +169,21 @@ identical in every repository — which removes the per-repository footgun descr [`dependabot-auto-merge.md`]. Renaming the caller away from `CI`, or back to per-pipeline names, silently stops Dependabot PRs merging. +## Interaction with the profile README + +The Status column on the organization profile is the latest run of one workflow file on a +repository's default branch, and KtsuBuild reads that file **by name**. It reads `ci.yml` — +the caller, not the pipeline the caller dispatches to. That is deliberate for the same reason +the dispatcher exists: a repository that starts building through a new pipeline keeps its +badge without the generator being taught anything. + +While repositories are still being moved over, [`update-readme.yml`] passes +`--fallback-workflow dotnet.yml`, so an unmigrated repository still shows a status and the run +logs a warning naming it. The flag comes off when the warnings stop. + +A repository that has neither file reports no status, which is the intended signal for a +repository that has opted out of shared CI rather than a bug to work around. + ## Adding a pipeline 1. Add the workflow to this repository with `on: workflow_call`. @@ -180,3 +195,4 @@ No repository is edited unless it is changing what kind of repository it is. [`ci-shared.yml`]: ../.github/workflows/ci-shared.yml [`dependabot-auto-merge.md`]: ./dependabot-auto-merge.md +[`update-readme.yml`]: ../.github/workflows/update-readme.yml