diff --git a/.claude/commands/handoff-plan.md b/.claude/commands/handoff-plan.md index 050fcd15..c71c934e 100644 --- a/.claude/commands/handoff-plan.md +++ b/.claude/commands/handoff-plan.md @@ -117,7 +117,7 @@ The plan's last step writes the plan's entries, for every plan: When the repository has a `version.json` at its root, which Nerdbank.GitVersioning builds each package's version from, and the plan has a `Release:` line, the same last step also sets that file's `version` to the `Release:` version without its leading `v`, such as `"1.4.0"` for `v1.4.0`, changing nothing else, and lists `version.json` on its Files line: a release tag whose commit holds another version publishes no package. When that version starts a new major version and the file's `assemblyVersion` names a `version`, the step also sets `assemblyVersion` to `{ "precision": "major" }`. The state script prints `version-file: match` when the file holds the plan's version, `mismatch ` when it holds another, and `-` without the file or a `Release:` line. -When the repository has `.github/workflows/raise-baseline.yml`, that workflow opens the pull request that raises `PackageValidationBaselineVersion` once nuget.org lists a release: a plan never raises the baseline in a step or lists raising it under `## Follow-ups`. +When the repository has `.github/workflows/raise-baseline.yml`, that workflow pushes the branch that raises `PackageValidationBaselineVersion` once nuget.org lists a release and opens an issue whose link opens its pull request: a plan never raises the baseline in a step or lists raising it under `## Follow-ups`. Write the step so the executor copies text: it gives the heading, each entry under its group, and each link line in full. In a pre-release project, it gives each entry to add in full, and each entry to rewrite or delete by its first words and, for a rewrite, its new text in full. Only `` is left to the executor, with the `Get-Date` command. Never reformat a changelog in another format, or an older section of any changelog, unless the request asks for it, as an adopted project's follow-up does; a heading that `changelog-duplicates` names in an older release section stays as it is. A plan that converts a changelog keeps every entry's text. It dates each version's heading with its tag's date (`git log -1 --format=%as `), puts each entry in one group, and adds the preamble, `## [Unreleased]` and the link reference definitions. diff --git a/.claude/commands/plan-bugfix.md b/.claude/commands/plan-bugfix.md index baee2a3c..75243752 100644 --- a/.claude/commands/plan-bugfix.md +++ b/.claude/commands/plan-bugfix.md @@ -119,7 +119,7 @@ The plan's last step writes the plan's entries, for every plan: When the repository has a `version.json` at its root, which Nerdbank.GitVersioning builds each package's version from, and the plan has a `Release:` line, the same last step also sets that file's `version` to the `Release:` version without its leading `v`, such as `"1.4.0"` for `v1.4.0`, changing nothing else, and lists `version.json` on its Files line: a release tag whose commit holds another version publishes no package. When that version starts a new major version and the file's `assemblyVersion` names a `version`, the step also sets `assemblyVersion` to `{ "precision": "major" }`. The state script prints `version-file: match` when the file holds the plan's version, `mismatch ` when it holds another, and `-` without the file or a `Release:` line. -When the repository has `.github/workflows/raise-baseline.yml`, that workflow opens the pull request that raises `PackageValidationBaselineVersion` once nuget.org lists a release: a plan never raises the baseline in a step or lists raising it under `## Follow-ups`. +When the repository has `.github/workflows/raise-baseline.yml`, that workflow pushes the branch that raises `PackageValidationBaselineVersion` once nuget.org lists a release and opens an issue whose link opens its pull request: a plan never raises the baseline in a step or lists raising it under `## Follow-ups`. Write the step so the executor copies text: it gives the heading, each entry under its group, and each link line in full. In a pre-release project, it gives each entry to add in full, and each entry to rewrite or delete by its first words and, for a rewrite, its new text in full. Only `` is left to the executor, with the `Get-Date` command. Never reformat a changelog in another format, or an older section of any changelog, unless the request asks for it, as an adopted project's follow-up does; a heading that `changelog-duplicates` names in an older release section stays as it is. A plan that converts a changelog keeps every entry's text. It dates each version's heading with its tag's date (`git log -1 --format=%as `), puts each entry in one group, and adds the preamble, `## [Unreleased]` and the link reference definitions. diff --git a/.claude/commands/plan-docs.md b/.claude/commands/plan-docs.md index d62f960d..93e3af2e 100644 --- a/.claude/commands/plan-docs.md +++ b/.claude/commands/plan-docs.md @@ -117,7 +117,7 @@ The plan's last step writes the plan's entries, for every plan: When the repository has a `version.json` at its root, which Nerdbank.GitVersioning builds each package's version from, and the plan has a `Release:` line, the same last step also sets that file's `version` to the `Release:` version without its leading `v`, such as `"1.4.0"` for `v1.4.0`, changing nothing else, and lists `version.json` on its Files line: a release tag whose commit holds another version publishes no package. When that version starts a new major version and the file's `assemblyVersion` names a `version`, the step also sets `assemblyVersion` to `{ "precision": "major" }`. The state script prints `version-file: match` when the file holds the plan's version, `mismatch ` when it holds another, and `-` without the file or a `Release:` line. -When the repository has `.github/workflows/raise-baseline.yml`, that workflow opens the pull request that raises `PackageValidationBaselineVersion` once nuget.org lists a release: a plan never raises the baseline in a step or lists raising it under `## Follow-ups`. +When the repository has `.github/workflows/raise-baseline.yml`, that workflow pushes the branch that raises `PackageValidationBaselineVersion` once nuget.org lists a release and opens an issue whose link opens its pull request: a plan never raises the baseline in a step or lists raising it under `## Follow-ups`. Write the step so the executor copies text: it gives the heading, each entry under its group, and each link line in full. In a pre-release project, it gives each entry to add in full, and each entry to rewrite or delete by its first words and, for a rewrite, its new text in full. Only `` is left to the executor, with the `Get-Date` command. Never reformat a changelog in another format, or an older section of any changelog, unless the request asks for it, as an adopted project's follow-up does; a heading that `changelog-duplicates` names in an older release section stays as it is. A plan that converts a changelog keeps every entry's text. It dates each version's heading with its tag's date (`git log -1 --format=%as `), puts each entry in one group, and adds the preamble, `## [Unreleased]` and the link reference definitions. diff --git a/.claude/commands/plan-feature.md b/.claude/commands/plan-feature.md index 4a5dbcf6..a7d4dd45 100644 --- a/.claude/commands/plan-feature.md +++ b/.claude/commands/plan-feature.md @@ -119,7 +119,7 @@ The plan's last step writes the plan's entries, for every plan: When the repository has a `version.json` at its root, which Nerdbank.GitVersioning builds each package's version from, and the plan has a `Release:` line, the same last step also sets that file's `version` to the `Release:` version without its leading `v`, such as `"1.4.0"` for `v1.4.0`, changing nothing else, and lists `version.json` on its Files line: a release tag whose commit holds another version publishes no package. When that version starts a new major version and the file's `assemblyVersion` names a `version`, the step also sets `assemblyVersion` to `{ "precision": "major" }`. The state script prints `version-file: match` when the file holds the plan's version, `mismatch ` when it holds another, and `-` without the file or a `Release:` line. -When the repository has `.github/workflows/raise-baseline.yml`, that workflow opens the pull request that raises `PackageValidationBaselineVersion` once nuget.org lists a release: a plan never raises the baseline in a step or lists raising it under `## Follow-ups`. +When the repository has `.github/workflows/raise-baseline.yml`, that workflow pushes the branch that raises `PackageValidationBaselineVersion` once nuget.org lists a release and opens an issue whose link opens its pull request: a plan never raises the baseline in a step or lists raising it under `## Follow-ups`. Write the step so the executor copies text: it gives the heading, each entry under its group, and each link line in full. In a pre-release project, it gives each entry to add in full, and each entry to rewrite or delete by its first words and, for a rewrite, its new text in full. Only `` is left to the executor, with the `Get-Date` command. Never reformat a changelog in another format, or an older section of any changelog, unless the request asks for it, as an adopted project's follow-up does; a heading that `changelog-duplicates` names in an older release section stays as it is. A plan that converts a changelog keeps every entry's text. It dates each version's heading with its tag's date (`git log -1 --format=%as `), puts each entry in one group, and adds the preamble, `## [Unreleased]` and the link reference definitions. diff --git a/.claude/commands/plan-issue.md b/.claude/commands/plan-issue.md index ce648f38..0906bb00 100644 --- a/.claude/commands/plan-issue.md +++ b/.claude/commands/plan-issue.md @@ -292,7 +292,7 @@ The plan's last step writes the plan's entries, for every plan: When the repository has a `version.json` at its root, which Nerdbank.GitVersioning builds each package's version from, and the plan has a `Release:` line, the same last step also sets that file's `version` to the `Release:` version without its leading `v`, such as `"1.4.0"` for `v1.4.0`, changing nothing else, and lists `version.json` on its Files line: a release tag whose commit holds another version publishes no package. When that version starts a new major version and the file's `assemblyVersion` names a `version`, the step also sets `assemblyVersion` to `{ "precision": "major" }`. The state script prints `version-file: match` when the file holds the plan's version, `mismatch ` when it holds another, and `-` without the file or a `Release:` line. -When the repository has `.github/workflows/raise-baseline.yml`, that workflow opens the pull request that raises `PackageValidationBaselineVersion` once nuget.org lists a release: a plan never raises the baseline in a step or lists raising it under `## Follow-ups`. +When the repository has `.github/workflows/raise-baseline.yml`, that workflow pushes the branch that raises `PackageValidationBaselineVersion` once nuget.org lists a release and opens an issue whose link opens its pull request: a plan never raises the baseline in a step or lists raising it under `## Follow-ups`. Write the step so the executor copies text: it gives the heading, each entry under its group, and each link line in full. In a pre-release project, it gives each entry to add in full, and each entry to rewrite or delete by its first words and, for a rewrite, its new text in full. Only `` is left to the executor, with the `Get-Date` command. Never reformat a changelog in another format, or an older section of any changelog, unless the request asks for it, as an adopted project's follow-up does; a heading that `changelog-duplicates` names in an older release section stays as it is. A plan that converts a changelog keeps every entry's text. It dates each version's heading with its tag's date (`git log -1 --format=%as `), puts each entry in one group, and adds the preamble, `## [Unreleased]` and the link reference definitions. diff --git a/.claude/commands/plan-migration.md b/.claude/commands/plan-migration.md index 277b64ab..742939f3 100644 --- a/.claude/commands/plan-migration.md +++ b/.claude/commands/plan-migration.md @@ -117,7 +117,7 @@ The plan's last step writes the plan's entries, for every plan: When the repository has a `version.json` at its root, which Nerdbank.GitVersioning builds each package's version from, and the plan has a `Release:` line, the same last step also sets that file's `version` to the `Release:` version without its leading `v`, such as `"1.4.0"` for `v1.4.0`, changing nothing else, and lists `version.json` on its Files line: a release tag whose commit holds another version publishes no package. When that version starts a new major version and the file's `assemblyVersion` names a `version`, the step also sets `assemblyVersion` to `{ "precision": "major" }`. The state script prints `version-file: match` when the file holds the plan's version, `mismatch ` when it holds another, and `-` without the file or a `Release:` line. -When the repository has `.github/workflows/raise-baseline.yml`, that workflow opens the pull request that raises `PackageValidationBaselineVersion` once nuget.org lists a release: a plan never raises the baseline in a step or lists raising it under `## Follow-ups`. +When the repository has `.github/workflows/raise-baseline.yml`, that workflow pushes the branch that raises `PackageValidationBaselineVersion` once nuget.org lists a release and opens an issue whose link opens its pull request: a plan never raises the baseline in a step or lists raising it under `## Follow-ups`. Write the step so the executor copies text: it gives the heading, each entry under its group, and each link line in full. In a pre-release project, it gives each entry to add in full, and each entry to rewrite or delete by its first words and, for a rewrite, its new text in full. Only `` is left to the executor, with the `Get-Date` command. Never reformat a changelog in another format, or an older section of any changelog, unless the request asks for it, as an adopted project's follow-up does; a heading that `changelog-duplicates` names in an older release section stays as it is. A plan that converts a changelog keeps every entry's text. It dates each version's heading with its tag's date (`git log -1 --format=%as `), puts each entry in one group, and adds the preamble, `## [Unreleased]` and the link reference definitions. diff --git a/.claude/commands/plan-performance.md b/.claude/commands/plan-performance.md index f79d155f..1ed7f0a5 100644 --- a/.claude/commands/plan-performance.md +++ b/.claude/commands/plan-performance.md @@ -116,7 +116,7 @@ The plan's last step writes the plan's entries, for every plan: When the repository has a `version.json` at its root, which Nerdbank.GitVersioning builds each package's version from, and the plan has a `Release:` line, the same last step also sets that file's `version` to the `Release:` version without its leading `v`, such as `"1.4.0"` for `v1.4.0`, changing nothing else, and lists `version.json` on its Files line: a release tag whose commit holds another version publishes no package. When that version starts a new major version and the file's `assemblyVersion` names a `version`, the step also sets `assemblyVersion` to `{ "precision": "major" }`. The state script prints `version-file: match` when the file holds the plan's version, `mismatch ` when it holds another, and `-` without the file or a `Release:` line. -When the repository has `.github/workflows/raise-baseline.yml`, that workflow opens the pull request that raises `PackageValidationBaselineVersion` once nuget.org lists a release: a plan never raises the baseline in a step or lists raising it under `## Follow-ups`. +When the repository has `.github/workflows/raise-baseline.yml`, that workflow pushes the branch that raises `PackageValidationBaselineVersion` once nuget.org lists a release and opens an issue whose link opens its pull request: a plan never raises the baseline in a step or lists raising it under `## Follow-ups`. Write the step so the executor copies text: it gives the heading, each entry under its group, and each link line in full. In a pre-release project, it gives each entry to add in full, and each entry to rewrite or delete by its first words and, for a rewrite, its new text in full. Only `` is left to the executor, with the `Get-Date` command. Never reformat a changelog in another format, or an older section of any changelog, unless the request asks for it, as an adopted project's follow-up does; a heading that `changelog-duplicates` names in an older release section stays as it is. A plan that converts a changelog keeps every entry's text. It dates each version's heading with its tag's date (`git log -1 --format=%as `), puts each entry in one group, and adds the preamble, `## [Unreleased]` and the link reference definitions. diff --git a/.claude/commands/plan-refactor.md b/.claude/commands/plan-refactor.md index dfbc1932..83744e2a 100644 --- a/.claude/commands/plan-refactor.md +++ b/.claude/commands/plan-refactor.md @@ -118,7 +118,7 @@ The plan's last step writes the plan's entries, for every plan: When the repository has a `version.json` at its root, which Nerdbank.GitVersioning builds each package's version from, and the plan has a `Release:` line, the same last step also sets that file's `version` to the `Release:` version without its leading `v`, such as `"1.4.0"` for `v1.4.0`, changing nothing else, and lists `version.json` on its Files line: a release tag whose commit holds another version publishes no package. When that version starts a new major version and the file's `assemblyVersion` names a `version`, the step also sets `assemblyVersion` to `{ "precision": "major" }`. The state script prints `version-file: match` when the file holds the plan's version, `mismatch ` when it holds another, and `-` without the file or a `Release:` line. -When the repository has `.github/workflows/raise-baseline.yml`, that workflow opens the pull request that raises `PackageValidationBaselineVersion` once nuget.org lists a release: a plan never raises the baseline in a step or lists raising it under `## Follow-ups`. +When the repository has `.github/workflows/raise-baseline.yml`, that workflow pushes the branch that raises `PackageValidationBaselineVersion` once nuget.org lists a release and opens an issue whose link opens its pull request: a plan never raises the baseline in a step or lists raising it under `## Follow-ups`. Write the step so the executor copies text: it gives the heading, each entry under its group, and each link line in full. In a pre-release project, it gives each entry to add in full, and each entry to rewrite or delete by its first words and, for a rewrite, its new text in full. Only `` is left to the executor, with the `Get-Date` command. Never reformat a changelog in another format, or an older section of any changelog, unless the request asks for it, as an adopted project's follow-up does; a heading that `changelog-duplicates` names in an older release section stays as it is. A plan that converts a changelog keeps every entry's text. It dates each version's heading with its tag's date (`git log -1 --format=%as `), puts each entry in one group, and adds the preamble, `## [Unreleased]` and the link reference definitions. diff --git a/.claude/commands/plan-security.md b/.claude/commands/plan-security.md index 8838d748..d9821098 100644 --- a/.claude/commands/plan-security.md +++ b/.claude/commands/plan-security.md @@ -116,7 +116,7 @@ The plan's last step writes the plan's entries, for every plan: When the repository has a `version.json` at its root, which Nerdbank.GitVersioning builds each package's version from, and the plan has a `Release:` line, the same last step also sets that file's `version` to the `Release:` version without its leading `v`, such as `"1.4.0"` for `v1.4.0`, changing nothing else, and lists `version.json` on its Files line: a release tag whose commit holds another version publishes no package. When that version starts a new major version and the file's `assemblyVersion` names a `version`, the step also sets `assemblyVersion` to `{ "precision": "major" }`. The state script prints `version-file: match` when the file holds the plan's version, `mismatch ` when it holds another, and `-` without the file or a `Release:` line. -When the repository has `.github/workflows/raise-baseline.yml`, that workflow opens the pull request that raises `PackageValidationBaselineVersion` once nuget.org lists a release: a plan never raises the baseline in a step or lists raising it under `## Follow-ups`. +When the repository has `.github/workflows/raise-baseline.yml`, that workflow pushes the branch that raises `PackageValidationBaselineVersion` once nuget.org lists a release and opens an issue whose link opens its pull request: a plan never raises the baseline in a step or lists raising it under `## Follow-ups`. Write the step so the executor copies text: it gives the heading, each entry under its group, and each link line in full. In a pre-release project, it gives each entry to add in full, and each entry to rewrite or delete by its first words and, for a rewrite, its new text in full. Only `` is left to the executor, with the `Get-Date` command. Never reformat a changelog in another format, or an older section of any changelog, unless the request asks for it, as an adopted project's follow-up does; a heading that `changelog-duplicates` names in an older release section stays as it is. A plan that converts a changelog keeps every entry's text. It dates each version's heading with its tag's date (`git log -1 --format=%as `), puts each entry in one group, and adds the preamble, `## [Unreleased]` and the link reference definitions. diff --git a/.claude/commands/plan-template-update.md b/.claude/commands/plan-template-update.md index 7ca81ed5..dfda8184 100644 --- a/.claude/commands/plan-template-update.md +++ b/.claude/commands/plan-template-update.md @@ -131,7 +131,7 @@ The plan's last step writes the plan's entries, for every plan: When the repository has a `version.json` at its root, which Nerdbank.GitVersioning builds each package's version from, and the plan has a `Release:` line, the same last step also sets that file's `version` to the `Release:` version without its leading `v`, such as `"1.4.0"` for `v1.4.0`, changing nothing else, and lists `version.json` on its Files line: a release tag whose commit holds another version publishes no package. When that version starts a new major version and the file's `assemblyVersion` names a `version`, the step also sets `assemblyVersion` to `{ "precision": "major" }`. The state script prints `version-file: match` when the file holds the plan's version, `mismatch ` when it holds another, and `-` without the file or a `Release:` line. -When the repository has `.github/workflows/raise-baseline.yml`, that workflow opens the pull request that raises `PackageValidationBaselineVersion` once nuget.org lists a release: a plan never raises the baseline in a step or lists raising it under `## Follow-ups`. +When the repository has `.github/workflows/raise-baseline.yml`, that workflow pushes the branch that raises `PackageValidationBaselineVersion` once nuget.org lists a release and opens an issue whose link opens its pull request: a plan never raises the baseline in a step or lists raising it under `## Follow-ups`. Write the step so the executor copies text: it gives the heading, each entry under its group, and each link line in full. In a pre-release project, it gives each entry to add in full, and each entry to rewrite or delete by its first words and, for a rewrite, its new text in full. Only `` is left to the executor, with the `Get-Date` command. Never reformat a changelog in another format, or an older section of any changelog, unless the request asks for it, as an adopted project's follow-up does; a heading that `changelog-duplicates` names in an older release section stays as it is. A plan that converts a changelog keeps every entry's text. It dates each version's heading with its tag's date (`git log -1 --format=%as `), puts each entry in one group, and adds the preamble, `## [Unreleased]` and the link reference definitions. diff --git a/.claude/commands/plan-tests.md b/.claude/commands/plan-tests.md index 293475e8..2b53a314 100644 --- a/.claude/commands/plan-tests.md +++ b/.claude/commands/plan-tests.md @@ -117,7 +117,7 @@ The plan's last step writes the plan's entries, for every plan: When the repository has a `version.json` at its root, which Nerdbank.GitVersioning builds each package's version from, and the plan has a `Release:` line, the same last step also sets that file's `version` to the `Release:` version without its leading `v`, such as `"1.4.0"` for `v1.4.0`, changing nothing else, and lists `version.json` on its Files line: a release tag whose commit holds another version publishes no package. When that version starts a new major version and the file's `assemblyVersion` names a `version`, the step also sets `assemblyVersion` to `{ "precision": "major" }`. The state script prints `version-file: match` when the file holds the plan's version, `mismatch ` when it holds another, and `-` without the file or a `Release:` line. -When the repository has `.github/workflows/raise-baseline.yml`, that workflow opens the pull request that raises `PackageValidationBaselineVersion` once nuget.org lists a release: a plan never raises the baseline in a step or lists raising it under `## Follow-ups`. +When the repository has `.github/workflows/raise-baseline.yml`, that workflow pushes the branch that raises `PackageValidationBaselineVersion` once nuget.org lists a release and opens an issue whose link opens its pull request: a plan never raises the baseline in a step or lists raising it under `## Follow-ups`. Write the step so the executor copies text: it gives the heading, each entry under its group, and each link line in full. In a pre-release project, it gives each entry to add in full, and each entry to rewrite or delete by its first words and, for a rewrite, its new text in full. Only `` is left to the executor, with the `Get-Date` command. Never reformat a changelog in another format, or an older section of any changelog, unless the request asks for it, as an adopted project's follow-up does; a heading that `changelog-duplicates` names in an older release section stays as it is. A plan that converts a changelog keeps every entry's text. It dates each version's heading with its tag's date (`git log -1 --format=%as `), puts each entry in one group, and adds the preamble, `## [Unreleased]` and the link reference definitions. diff --git a/.claude/commands/ship-plan.md b/.claude/commands/ship-plan.md index 564da75b..79e0845f 100644 --- a/.claude/commands/ship-plan.md +++ b/.claude/commands/ship-plan.md @@ -111,7 +111,7 @@ The plan's last step writes the plan's entries, for every plan: When the repository has a `version.json` at its root, which Nerdbank.GitVersioning builds each package's version from, and the plan has a `Release:` line, the same last step also sets that file's `version` to the `Release:` version without its leading `v`, such as `"1.4.0"` for `v1.4.0`, changing nothing else, and lists `version.json` on its Files line: a release tag whose commit holds another version publishes no package. When that version starts a new major version and the file's `assemblyVersion` names a `version`, the step also sets `assemblyVersion` to `{ "precision": "major" }`. The state script prints `version-file: match` when the file holds the plan's version, `mismatch ` when it holds another, and `-` without the file or a `Release:` line. -When the repository has `.github/workflows/raise-baseline.yml`, that workflow opens the pull request that raises `PackageValidationBaselineVersion` once nuget.org lists a release: a plan never raises the baseline in a step or lists raising it under `## Follow-ups`. +When the repository has `.github/workflows/raise-baseline.yml`, that workflow pushes the branch that raises `PackageValidationBaselineVersion` once nuget.org lists a release and opens an issue whose link opens its pull request: a plan never raises the baseline in a step or lists raising it under `## Follow-ups`. Write the step so the executor copies text: it gives the heading, each entry under its group, and each link line in full. In a pre-release project, it gives each entry to add in full, and each entry to rewrite or delete by its first words and, for a rewrite, its new text in full. Only `` is left to the executor, with the `Get-Date` command. Never reformat a changelog in another format, or an older section of any changelog, unless the request asks for it, as an adopted project's follow-up does; a heading that `changelog-duplicates` names in an older release section stays as it is. A plan that converts a changelog keeps every entry's text. It dates each version's heading with its tag's date (`git log -1 --format=%as `), puts each entry in one group, and adds the preamble, `## [Unreleased]` and the link reference definitions. diff --git a/.github/agents/copilot-planner.agent.md b/.github/agents/copilot-planner.agent.md index c3007235..652af4a5 100644 --- a/.github/agents/copilot-planner.agent.md +++ b/.github/agents/copilot-planner.agent.md @@ -180,7 +180,7 @@ The plan's last step writes the plan's entries, for every plan: When the repository has a `version.json` at its root, which Nerdbank.GitVersioning builds each package's version from, and the plan has a `Release:` line, the same last step also sets that file's `version` to the `Release:` version without its leading `v`, such as `"1.4.0"` for `v1.4.0`, changing nothing else, and lists `version.json` on its Files line: a release tag whose commit holds another version publishes no package. When that version starts a new major version and the file's `assemblyVersion` names a `version`, the step also sets `assemblyVersion` to `{ "precision": "major" }`. The state script prints `version-file: match` when the file holds the plan's version, `mismatch ` when it holds another, and `-` without the file or a `Release:` line. -When the repository has `.github/workflows/raise-baseline.yml`, that workflow opens the pull request that raises `PackageValidationBaselineVersion` once nuget.org lists a release: a plan never raises the baseline in a step or lists raising it under `## Follow-ups`. +When the repository has `.github/workflows/raise-baseline.yml`, that workflow pushes the branch that raises `PackageValidationBaselineVersion` once nuget.org lists a release and opens an issue whose link opens its pull request: a plan never raises the baseline in a step or lists raising it under `## Follow-ups`. Write the step so the executor copies text: it gives the heading, each entry under its group, and each link line in full. In a pre-release project, it gives each entry to add in full, and each entry to rewrite or delete by its first words and, for a rewrite, its new text in full. Only `` is left to the executor, with the `Get-Date` command. Never reformat a changelog in another format, or an older section of any changelog, unless the request asks for it, as an adopted project's follow-up does; a heading that `changelog-duplicates` names in an older release section stays as it is. A plan that converts a changelog keeps every entry's text. It dates each version's heading with its tag's date (`git log -1 --format=%as `), puts each entry in one group, and adds the preamble, `## [Unreleased]` and the link reference definitions. diff --git a/.github/agents/hybrid-planner.agent.md b/.github/agents/hybrid-planner.agent.md index a8b7507c..c0e6d39e 100644 --- a/.github/agents/hybrid-planner.agent.md +++ b/.github/agents/hybrid-planner.agent.md @@ -180,7 +180,7 @@ The plan's last step writes the plan's entries, for every plan: When the repository has a `version.json` at its root, which Nerdbank.GitVersioning builds each package's version from, and the plan has a `Release:` line, the same last step also sets that file's `version` to the `Release:` version without its leading `v`, such as `"1.4.0"` for `v1.4.0`, changing nothing else, and lists `version.json` on its Files line: a release tag whose commit holds another version publishes no package. When that version starts a new major version and the file's `assemblyVersion` names a `version`, the step also sets `assemblyVersion` to `{ "precision": "major" }`. The state script prints `version-file: match` when the file holds the plan's version, `mismatch ` when it holds another, and `-` without the file or a `Release:` line. -When the repository has `.github/workflows/raise-baseline.yml`, that workflow opens the pull request that raises `PackageValidationBaselineVersion` once nuget.org lists a release: a plan never raises the baseline in a step or lists raising it under `## Follow-ups`. +When the repository has `.github/workflows/raise-baseline.yml`, that workflow pushes the branch that raises `PackageValidationBaselineVersion` once nuget.org lists a release and opens an issue whose link opens its pull request: a plan never raises the baseline in a step or lists raising it under `## Follow-ups`. Write the step so the executor copies text: it gives the heading, each entry under its group, and each link line in full. In a pre-release project, it gives each entry to add in full, and each entry to rewrite or delete by its first words and, for a rewrite, its new text in full. Only `` is left to the executor, with the `Get-Date` command. Never reformat a changelog in another format, or an older section of any changelog, unless the request asks for it, as an adopted project's follow-up does; a heading that `changelog-duplicates` names in an older release section stays as it is. A plan that converts a changelog keeps every entry's text. It dates each version's heading with its tag's date (`git log -1 --format=%as `), puts each entry in one group, and adds the preamble, `## [Unreleased]` and the link reference definitions. diff --git a/.github/prompts/handoff-plan.prompt.md b/.github/prompts/handoff-plan.prompt.md index ea3891ae..b1d9ddda 100644 --- a/.github/prompts/handoff-plan.prompt.md +++ b/.github/prompts/handoff-plan.prompt.md @@ -123,7 +123,7 @@ The plan's last step writes the plan's entries, for every plan: When the repository has a `version.json` at its root, which Nerdbank.GitVersioning builds each package's version from, and the plan has a `Release:` line, the same last step also sets that file's `version` to the `Release:` version without its leading `v`, such as `"1.4.0"` for `v1.4.0`, changing nothing else, and lists `version.json` on its Files line: a release tag whose commit holds another version publishes no package. When that version starts a new major version and the file's `assemblyVersion` names a `version`, the step also sets `assemblyVersion` to `{ "precision": "major" }`. The state script prints `version-file: match` when the file holds the plan's version, `mismatch ` when it holds another, and `-` without the file or a `Release:` line. -When the repository has `.github/workflows/raise-baseline.yml`, that workflow opens the pull request that raises `PackageValidationBaselineVersion` once nuget.org lists a release: a plan never raises the baseline in a step or lists raising it under `## Follow-ups`. +When the repository has `.github/workflows/raise-baseline.yml`, that workflow pushes the branch that raises `PackageValidationBaselineVersion` once nuget.org lists a release and opens an issue whose link opens its pull request: a plan never raises the baseline in a step or lists raising it under `## Follow-ups`. Write the step so the executor copies text: it gives the heading, each entry under its group, and each link line in full. In a pre-release project, it gives each entry to add in full, and each entry to rewrite or delete by its first words and, for a rewrite, its new text in full. Only `` is left to the executor, with the `Get-Date` command. Never reformat a changelog in another format, or an older section of any changelog, unless the request asks for it, as an adopted project's follow-up does; a heading that `changelog-duplicates` names in an older release section stays as it is. A plan that converts a changelog keeps every entry's text. It dates each version's heading with its tag's date (`git log -1 --format=%as `), puts each entry in one group, and adds the preamble, `## [Unreleased]` and the link reference definitions. diff --git a/.github/prompts/plan-bugfix.prompt.md b/.github/prompts/plan-bugfix.prompt.md index 3c63c03a..e12d0acb 100644 --- a/.github/prompts/plan-bugfix.prompt.md +++ b/.github/prompts/plan-bugfix.prompt.md @@ -125,7 +125,7 @@ The plan's last step writes the plan's entries, for every plan: When the repository has a `version.json` at its root, which Nerdbank.GitVersioning builds each package's version from, and the plan has a `Release:` line, the same last step also sets that file's `version` to the `Release:` version without its leading `v`, such as `"1.4.0"` for `v1.4.0`, changing nothing else, and lists `version.json` on its Files line: a release tag whose commit holds another version publishes no package. When that version starts a new major version and the file's `assemblyVersion` names a `version`, the step also sets `assemblyVersion` to `{ "precision": "major" }`. The state script prints `version-file: match` when the file holds the plan's version, `mismatch ` when it holds another, and `-` without the file or a `Release:` line. -When the repository has `.github/workflows/raise-baseline.yml`, that workflow opens the pull request that raises `PackageValidationBaselineVersion` once nuget.org lists a release: a plan never raises the baseline in a step or lists raising it under `## Follow-ups`. +When the repository has `.github/workflows/raise-baseline.yml`, that workflow pushes the branch that raises `PackageValidationBaselineVersion` once nuget.org lists a release and opens an issue whose link opens its pull request: a plan never raises the baseline in a step or lists raising it under `## Follow-ups`. Write the step so the executor copies text: it gives the heading, each entry under its group, and each link line in full. In a pre-release project, it gives each entry to add in full, and each entry to rewrite or delete by its first words and, for a rewrite, its new text in full. Only `` is left to the executor, with the `Get-Date` command. Never reformat a changelog in another format, or an older section of any changelog, unless the request asks for it, as an adopted project's follow-up does; a heading that `changelog-duplicates` names in an older release section stays as it is. A plan that converts a changelog keeps every entry's text. It dates each version's heading with its tag's date (`git log -1 --format=%as `), puts each entry in one group, and adds the preamble, `## [Unreleased]` and the link reference definitions. diff --git a/.github/prompts/plan-docs.prompt.md b/.github/prompts/plan-docs.prompt.md index e3c40c5a..6a698145 100644 --- a/.github/prompts/plan-docs.prompt.md +++ b/.github/prompts/plan-docs.prompt.md @@ -123,7 +123,7 @@ The plan's last step writes the plan's entries, for every plan: When the repository has a `version.json` at its root, which Nerdbank.GitVersioning builds each package's version from, and the plan has a `Release:` line, the same last step also sets that file's `version` to the `Release:` version without its leading `v`, such as `"1.4.0"` for `v1.4.0`, changing nothing else, and lists `version.json` on its Files line: a release tag whose commit holds another version publishes no package. When that version starts a new major version and the file's `assemblyVersion` names a `version`, the step also sets `assemblyVersion` to `{ "precision": "major" }`. The state script prints `version-file: match` when the file holds the plan's version, `mismatch ` when it holds another, and `-` without the file or a `Release:` line. -When the repository has `.github/workflows/raise-baseline.yml`, that workflow opens the pull request that raises `PackageValidationBaselineVersion` once nuget.org lists a release: a plan never raises the baseline in a step or lists raising it under `## Follow-ups`. +When the repository has `.github/workflows/raise-baseline.yml`, that workflow pushes the branch that raises `PackageValidationBaselineVersion` once nuget.org lists a release and opens an issue whose link opens its pull request: a plan never raises the baseline in a step or lists raising it under `## Follow-ups`. Write the step so the executor copies text: it gives the heading, each entry under its group, and each link line in full. In a pre-release project, it gives each entry to add in full, and each entry to rewrite or delete by its first words and, for a rewrite, its new text in full. Only `` is left to the executor, with the `Get-Date` command. Never reformat a changelog in another format, or an older section of any changelog, unless the request asks for it, as an adopted project's follow-up does; a heading that `changelog-duplicates` names in an older release section stays as it is. A plan that converts a changelog keeps every entry's text. It dates each version's heading with its tag's date (`git log -1 --format=%as `), puts each entry in one group, and adds the preamble, `## [Unreleased]` and the link reference definitions. diff --git a/.github/prompts/plan-feature.prompt.md b/.github/prompts/plan-feature.prompt.md index 704fd565..1beb231e 100644 --- a/.github/prompts/plan-feature.prompt.md +++ b/.github/prompts/plan-feature.prompt.md @@ -125,7 +125,7 @@ The plan's last step writes the plan's entries, for every plan: When the repository has a `version.json` at its root, which Nerdbank.GitVersioning builds each package's version from, and the plan has a `Release:` line, the same last step also sets that file's `version` to the `Release:` version without its leading `v`, such as `"1.4.0"` for `v1.4.0`, changing nothing else, and lists `version.json` on its Files line: a release tag whose commit holds another version publishes no package. When that version starts a new major version and the file's `assemblyVersion` names a `version`, the step also sets `assemblyVersion` to `{ "precision": "major" }`. The state script prints `version-file: match` when the file holds the plan's version, `mismatch ` when it holds another, and `-` without the file or a `Release:` line. -When the repository has `.github/workflows/raise-baseline.yml`, that workflow opens the pull request that raises `PackageValidationBaselineVersion` once nuget.org lists a release: a plan never raises the baseline in a step or lists raising it under `## Follow-ups`. +When the repository has `.github/workflows/raise-baseline.yml`, that workflow pushes the branch that raises `PackageValidationBaselineVersion` once nuget.org lists a release and opens an issue whose link opens its pull request: a plan never raises the baseline in a step or lists raising it under `## Follow-ups`. Write the step so the executor copies text: it gives the heading, each entry under its group, and each link line in full. In a pre-release project, it gives each entry to add in full, and each entry to rewrite or delete by its first words and, for a rewrite, its new text in full. Only `` is left to the executor, with the `Get-Date` command. Never reformat a changelog in another format, or an older section of any changelog, unless the request asks for it, as an adopted project's follow-up does; a heading that `changelog-duplicates` names in an older release section stays as it is. A plan that converts a changelog keeps every entry's text. It dates each version's heading with its tag's date (`git log -1 --format=%as `), puts each entry in one group, and adds the preamble, `## [Unreleased]` and the link reference definitions. diff --git a/.github/prompts/plan-issue.prompt.md b/.github/prompts/plan-issue.prompt.md index 51fd5965..202f7564 100644 --- a/.github/prompts/plan-issue.prompt.md +++ b/.github/prompts/plan-issue.prompt.md @@ -298,7 +298,7 @@ The plan's last step writes the plan's entries, for every plan: When the repository has a `version.json` at its root, which Nerdbank.GitVersioning builds each package's version from, and the plan has a `Release:` line, the same last step also sets that file's `version` to the `Release:` version without its leading `v`, such as `"1.4.0"` for `v1.4.0`, changing nothing else, and lists `version.json` on its Files line: a release tag whose commit holds another version publishes no package. When that version starts a new major version and the file's `assemblyVersion` names a `version`, the step also sets `assemblyVersion` to `{ "precision": "major" }`. The state script prints `version-file: match` when the file holds the plan's version, `mismatch ` when it holds another, and `-` without the file or a `Release:` line. -When the repository has `.github/workflows/raise-baseline.yml`, that workflow opens the pull request that raises `PackageValidationBaselineVersion` once nuget.org lists a release: a plan never raises the baseline in a step or lists raising it under `## Follow-ups`. +When the repository has `.github/workflows/raise-baseline.yml`, that workflow pushes the branch that raises `PackageValidationBaselineVersion` once nuget.org lists a release and opens an issue whose link opens its pull request: a plan never raises the baseline in a step or lists raising it under `## Follow-ups`. Write the step so the executor copies text: it gives the heading, each entry under its group, and each link line in full. In a pre-release project, it gives each entry to add in full, and each entry to rewrite or delete by its first words and, for a rewrite, its new text in full. Only `` is left to the executor, with the `Get-Date` command. Never reformat a changelog in another format, or an older section of any changelog, unless the request asks for it, as an adopted project's follow-up does; a heading that `changelog-duplicates` names in an older release section stays as it is. A plan that converts a changelog keeps every entry's text. It dates each version's heading with its tag's date (`git log -1 --format=%as `), puts each entry in one group, and adds the preamble, `## [Unreleased]` and the link reference definitions. diff --git a/.github/prompts/plan-migration.prompt.md b/.github/prompts/plan-migration.prompt.md index f82ef48c..1e2d1cc7 100644 --- a/.github/prompts/plan-migration.prompt.md +++ b/.github/prompts/plan-migration.prompt.md @@ -123,7 +123,7 @@ The plan's last step writes the plan's entries, for every plan: When the repository has a `version.json` at its root, which Nerdbank.GitVersioning builds each package's version from, and the plan has a `Release:` line, the same last step also sets that file's `version` to the `Release:` version without its leading `v`, such as `"1.4.0"` for `v1.4.0`, changing nothing else, and lists `version.json` on its Files line: a release tag whose commit holds another version publishes no package. When that version starts a new major version and the file's `assemblyVersion` names a `version`, the step also sets `assemblyVersion` to `{ "precision": "major" }`. The state script prints `version-file: match` when the file holds the plan's version, `mismatch ` when it holds another, and `-` without the file or a `Release:` line. -When the repository has `.github/workflows/raise-baseline.yml`, that workflow opens the pull request that raises `PackageValidationBaselineVersion` once nuget.org lists a release: a plan never raises the baseline in a step or lists raising it under `## Follow-ups`. +When the repository has `.github/workflows/raise-baseline.yml`, that workflow pushes the branch that raises `PackageValidationBaselineVersion` once nuget.org lists a release and opens an issue whose link opens its pull request: a plan never raises the baseline in a step or lists raising it under `## Follow-ups`. Write the step so the executor copies text: it gives the heading, each entry under its group, and each link line in full. In a pre-release project, it gives each entry to add in full, and each entry to rewrite or delete by its first words and, for a rewrite, its new text in full. Only `` is left to the executor, with the `Get-Date` command. Never reformat a changelog in another format, or an older section of any changelog, unless the request asks for it, as an adopted project's follow-up does; a heading that `changelog-duplicates` names in an older release section stays as it is. A plan that converts a changelog keeps every entry's text. It dates each version's heading with its tag's date (`git log -1 --format=%as `), puts each entry in one group, and adds the preamble, `## [Unreleased]` and the link reference definitions. diff --git a/.github/prompts/plan-performance.prompt.md b/.github/prompts/plan-performance.prompt.md index 1f98b6d2..2b9c0a37 100644 --- a/.github/prompts/plan-performance.prompt.md +++ b/.github/prompts/plan-performance.prompt.md @@ -122,7 +122,7 @@ The plan's last step writes the plan's entries, for every plan: When the repository has a `version.json` at its root, which Nerdbank.GitVersioning builds each package's version from, and the plan has a `Release:` line, the same last step also sets that file's `version` to the `Release:` version without its leading `v`, such as `"1.4.0"` for `v1.4.0`, changing nothing else, and lists `version.json` on its Files line: a release tag whose commit holds another version publishes no package. When that version starts a new major version and the file's `assemblyVersion` names a `version`, the step also sets `assemblyVersion` to `{ "precision": "major" }`. The state script prints `version-file: match` when the file holds the plan's version, `mismatch ` when it holds another, and `-` without the file or a `Release:` line. -When the repository has `.github/workflows/raise-baseline.yml`, that workflow opens the pull request that raises `PackageValidationBaselineVersion` once nuget.org lists a release: a plan never raises the baseline in a step or lists raising it under `## Follow-ups`. +When the repository has `.github/workflows/raise-baseline.yml`, that workflow pushes the branch that raises `PackageValidationBaselineVersion` once nuget.org lists a release and opens an issue whose link opens its pull request: a plan never raises the baseline in a step or lists raising it under `## Follow-ups`. Write the step so the executor copies text: it gives the heading, each entry under its group, and each link line in full. In a pre-release project, it gives each entry to add in full, and each entry to rewrite or delete by its first words and, for a rewrite, its new text in full. Only `` is left to the executor, with the `Get-Date` command. Never reformat a changelog in another format, or an older section of any changelog, unless the request asks for it, as an adopted project's follow-up does; a heading that `changelog-duplicates` names in an older release section stays as it is. A plan that converts a changelog keeps every entry's text. It dates each version's heading with its tag's date (`git log -1 --format=%as `), puts each entry in one group, and adds the preamble, `## [Unreleased]` and the link reference definitions. diff --git a/.github/prompts/plan-refactor.prompt.md b/.github/prompts/plan-refactor.prompt.md index d51da117..58bf9775 100644 --- a/.github/prompts/plan-refactor.prompt.md +++ b/.github/prompts/plan-refactor.prompt.md @@ -124,7 +124,7 @@ The plan's last step writes the plan's entries, for every plan: When the repository has a `version.json` at its root, which Nerdbank.GitVersioning builds each package's version from, and the plan has a `Release:` line, the same last step also sets that file's `version` to the `Release:` version without its leading `v`, such as `"1.4.0"` for `v1.4.0`, changing nothing else, and lists `version.json` on its Files line: a release tag whose commit holds another version publishes no package. When that version starts a new major version and the file's `assemblyVersion` names a `version`, the step also sets `assemblyVersion` to `{ "precision": "major" }`. The state script prints `version-file: match` when the file holds the plan's version, `mismatch ` when it holds another, and `-` without the file or a `Release:` line. -When the repository has `.github/workflows/raise-baseline.yml`, that workflow opens the pull request that raises `PackageValidationBaselineVersion` once nuget.org lists a release: a plan never raises the baseline in a step or lists raising it under `## Follow-ups`. +When the repository has `.github/workflows/raise-baseline.yml`, that workflow pushes the branch that raises `PackageValidationBaselineVersion` once nuget.org lists a release and opens an issue whose link opens its pull request: a plan never raises the baseline in a step or lists raising it under `## Follow-ups`. Write the step so the executor copies text: it gives the heading, each entry under its group, and each link line in full. In a pre-release project, it gives each entry to add in full, and each entry to rewrite or delete by its first words and, for a rewrite, its new text in full. Only `` is left to the executor, with the `Get-Date` command. Never reformat a changelog in another format, or an older section of any changelog, unless the request asks for it, as an adopted project's follow-up does; a heading that `changelog-duplicates` names in an older release section stays as it is. A plan that converts a changelog keeps every entry's text. It dates each version's heading with its tag's date (`git log -1 --format=%as `), puts each entry in one group, and adds the preamble, `## [Unreleased]` and the link reference definitions. diff --git a/.github/prompts/plan-security.prompt.md b/.github/prompts/plan-security.prompt.md index 7828a4d6..51c185fb 100644 --- a/.github/prompts/plan-security.prompt.md +++ b/.github/prompts/plan-security.prompt.md @@ -122,7 +122,7 @@ The plan's last step writes the plan's entries, for every plan: When the repository has a `version.json` at its root, which Nerdbank.GitVersioning builds each package's version from, and the plan has a `Release:` line, the same last step also sets that file's `version` to the `Release:` version without its leading `v`, such as `"1.4.0"` for `v1.4.0`, changing nothing else, and lists `version.json` on its Files line: a release tag whose commit holds another version publishes no package. When that version starts a new major version and the file's `assemblyVersion` names a `version`, the step also sets `assemblyVersion` to `{ "precision": "major" }`. The state script prints `version-file: match` when the file holds the plan's version, `mismatch ` when it holds another, and `-` without the file or a `Release:` line. -When the repository has `.github/workflows/raise-baseline.yml`, that workflow opens the pull request that raises `PackageValidationBaselineVersion` once nuget.org lists a release: a plan never raises the baseline in a step or lists raising it under `## Follow-ups`. +When the repository has `.github/workflows/raise-baseline.yml`, that workflow pushes the branch that raises `PackageValidationBaselineVersion` once nuget.org lists a release and opens an issue whose link opens its pull request: a plan never raises the baseline in a step or lists raising it under `## Follow-ups`. Write the step so the executor copies text: it gives the heading, each entry under its group, and each link line in full. In a pre-release project, it gives each entry to add in full, and each entry to rewrite or delete by its first words and, for a rewrite, its new text in full. Only `` is left to the executor, with the `Get-Date` command. Never reformat a changelog in another format, or an older section of any changelog, unless the request asks for it, as an adopted project's follow-up does; a heading that `changelog-duplicates` names in an older release section stays as it is. A plan that converts a changelog keeps every entry's text. It dates each version's heading with its tag's date (`git log -1 --format=%as `), puts each entry in one group, and adds the preamble, `## [Unreleased]` and the link reference definitions. diff --git a/.github/prompts/plan-template-update.prompt.md b/.github/prompts/plan-template-update.prompt.md index bf12b24f..0d4d6105 100644 --- a/.github/prompts/plan-template-update.prompt.md +++ b/.github/prompts/plan-template-update.prompt.md @@ -137,7 +137,7 @@ The plan's last step writes the plan's entries, for every plan: When the repository has a `version.json` at its root, which Nerdbank.GitVersioning builds each package's version from, and the plan has a `Release:` line, the same last step also sets that file's `version` to the `Release:` version without its leading `v`, such as `"1.4.0"` for `v1.4.0`, changing nothing else, and lists `version.json` on its Files line: a release tag whose commit holds another version publishes no package. When that version starts a new major version and the file's `assemblyVersion` names a `version`, the step also sets `assemblyVersion` to `{ "precision": "major" }`. The state script prints `version-file: match` when the file holds the plan's version, `mismatch ` when it holds another, and `-` without the file or a `Release:` line. -When the repository has `.github/workflows/raise-baseline.yml`, that workflow opens the pull request that raises `PackageValidationBaselineVersion` once nuget.org lists a release: a plan never raises the baseline in a step or lists raising it under `## Follow-ups`. +When the repository has `.github/workflows/raise-baseline.yml`, that workflow pushes the branch that raises `PackageValidationBaselineVersion` once nuget.org lists a release and opens an issue whose link opens its pull request: a plan never raises the baseline in a step or lists raising it under `## Follow-ups`. Write the step so the executor copies text: it gives the heading, each entry under its group, and each link line in full. In a pre-release project, it gives each entry to add in full, and each entry to rewrite or delete by its first words and, for a rewrite, its new text in full. Only `` is left to the executor, with the `Get-Date` command. Never reformat a changelog in another format, or an older section of any changelog, unless the request asks for it, as an adopted project's follow-up does; a heading that `changelog-duplicates` names in an older release section stays as it is. A plan that converts a changelog keeps every entry's text. It dates each version's heading with its tag's date (`git log -1 --format=%as `), puts each entry in one group, and adds the preamble, `## [Unreleased]` and the link reference definitions. diff --git a/.github/prompts/plan-tests.prompt.md b/.github/prompts/plan-tests.prompt.md index edfdff5e..ab065132 100644 --- a/.github/prompts/plan-tests.prompt.md +++ b/.github/prompts/plan-tests.prompt.md @@ -123,7 +123,7 @@ The plan's last step writes the plan's entries, for every plan: When the repository has a `version.json` at its root, which Nerdbank.GitVersioning builds each package's version from, and the plan has a `Release:` line, the same last step also sets that file's `version` to the `Release:` version without its leading `v`, such as `"1.4.0"` for `v1.4.0`, changing nothing else, and lists `version.json` on its Files line: a release tag whose commit holds another version publishes no package. When that version starts a new major version and the file's `assemblyVersion` names a `version`, the step also sets `assemblyVersion` to `{ "precision": "major" }`. The state script prints `version-file: match` when the file holds the plan's version, `mismatch ` when it holds another, and `-` without the file or a `Release:` line. -When the repository has `.github/workflows/raise-baseline.yml`, that workflow opens the pull request that raises `PackageValidationBaselineVersion` once nuget.org lists a release: a plan never raises the baseline in a step or lists raising it under `## Follow-ups`. +When the repository has `.github/workflows/raise-baseline.yml`, that workflow pushes the branch that raises `PackageValidationBaselineVersion` once nuget.org lists a release and opens an issue whose link opens its pull request: a plan never raises the baseline in a step or lists raising it under `## Follow-ups`. Write the step so the executor copies text: it gives the heading, each entry under its group, and each link line in full. In a pre-release project, it gives each entry to add in full, and each entry to rewrite or delete by its first words and, for a rewrite, its new text in full. Only `` is left to the executor, with the `Get-Date` command. Never reformat a changelog in another format, or an older section of any changelog, unless the request asks for it, as an adopted project's follow-up does; a heading that `changelog-duplicates` names in an older release section stays as it is. A plan that converts a changelog keeps every entry's text. It dates each version's heading with its tag's date (`git log -1 --format=%as `), puts each entry in one group, and adds the preamble, `## [Unreleased]` and the link reference definitions. diff --git a/.github/prompts/ship-plan.prompt.md b/.github/prompts/ship-plan.prompt.md index d644c653..385713a7 100644 --- a/.github/prompts/ship-plan.prompt.md +++ b/.github/prompts/ship-plan.prompt.md @@ -111,7 +111,7 @@ The plan's last step writes the plan's entries, for every plan: When the repository has a `version.json` at its root, which Nerdbank.GitVersioning builds each package's version from, and the plan has a `Release:` line, the same last step also sets that file's `version` to the `Release:` version without its leading `v`, such as `"1.4.0"` for `v1.4.0`, changing nothing else, and lists `version.json` on its Files line: a release tag whose commit holds another version publishes no package. When that version starts a new major version and the file's `assemblyVersion` names a `version`, the step also sets `assemblyVersion` to `{ "precision": "major" }`. The state script prints `version-file: match` when the file holds the plan's version, `mismatch ` when it holds another, and `-` without the file or a `Release:` line. -When the repository has `.github/workflows/raise-baseline.yml`, that workflow opens the pull request that raises `PackageValidationBaselineVersion` once nuget.org lists a release: a plan never raises the baseline in a step or lists raising it under `## Follow-ups`. +When the repository has `.github/workflows/raise-baseline.yml`, that workflow pushes the branch that raises `PackageValidationBaselineVersion` once nuget.org lists a release and opens an issue whose link opens its pull request: a plan never raises the baseline in a step or lists raising it under `## Follow-ups`. Write the step so the executor copies text: it gives the heading, each entry under its group, and each link line in full. In a pre-release project, it gives each entry to add in full, and each entry to rewrite or delete by its first words and, for a rewrite, its new text in full. Only `` is left to the executor, with the `Get-Date` command. Never reformat a changelog in another format, or an older section of any changelog, unless the request asks for it, as an adopted project's follow-up does; a heading that `changelog-duplicates` names in an older release section stays as it is. A plan that converts a changelog keeps every entry's text. It dates each version's heading with its tag's date (`git log -1 --format=%as `), puts each entry in one group, and adds the preamble, `## [Unreleased]` and the link reference definitions. diff --git a/.github/skills/handoff-plan/SKILL.md b/.github/skills/handoff-plan/SKILL.md index 1d2cd9eb..458a5556 100644 --- a/.github/skills/handoff-plan/SKILL.md +++ b/.github/skills/handoff-plan/SKILL.md @@ -121,7 +121,7 @@ The plan's last step writes the plan's entries, for every plan: When the repository has a `version.json` at its root, which Nerdbank.GitVersioning builds each package's version from, and the plan has a `Release:` line, the same last step also sets that file's `version` to the `Release:` version without its leading `v`, such as `"1.4.0"` for `v1.4.0`, changing nothing else, and lists `version.json` on its Files line: a release tag whose commit holds another version publishes no package. When that version starts a new major version and the file's `assemblyVersion` names a `version`, the step also sets `assemblyVersion` to `{ "precision": "major" }`. The state script prints `version-file: match` when the file holds the plan's version, `mismatch ` when it holds another, and `-` without the file or a `Release:` line. -When the repository has `.github/workflows/raise-baseline.yml`, that workflow opens the pull request that raises `PackageValidationBaselineVersion` once nuget.org lists a release: a plan never raises the baseline in a step or lists raising it under `## Follow-ups`. +When the repository has `.github/workflows/raise-baseline.yml`, that workflow pushes the branch that raises `PackageValidationBaselineVersion` once nuget.org lists a release and opens an issue whose link opens its pull request: a plan never raises the baseline in a step or lists raising it under `## Follow-ups`. Write the step so the executor copies text: it gives the heading, each entry under its group, and each link line in full. In a pre-release project, it gives each entry to add in full, and each entry to rewrite or delete by its first words and, for a rewrite, its new text in full. Only `` is left to the executor, with the `Get-Date` command. Never reformat a changelog in another format, or an older section of any changelog, unless the request asks for it, as an adopted project's follow-up does; a heading that `changelog-duplicates` names in an older release section stays as it is. A plan that converts a changelog keeps every entry's text. It dates each version's heading with its tag's date (`git log -1 --format=%as `), puts each entry in one group, and adds the preamble, `## [Unreleased]` and the link reference definitions. diff --git a/.github/skills/plan-bugfix/SKILL.md b/.github/skills/plan-bugfix/SKILL.md index e11d4cd8..21a5fbe7 100644 --- a/.github/skills/plan-bugfix/SKILL.md +++ b/.github/skills/plan-bugfix/SKILL.md @@ -123,7 +123,7 @@ The plan's last step writes the plan's entries, for every plan: When the repository has a `version.json` at its root, which Nerdbank.GitVersioning builds each package's version from, and the plan has a `Release:` line, the same last step also sets that file's `version` to the `Release:` version without its leading `v`, such as `"1.4.0"` for `v1.4.0`, changing nothing else, and lists `version.json` on its Files line: a release tag whose commit holds another version publishes no package. When that version starts a new major version and the file's `assemblyVersion` names a `version`, the step also sets `assemblyVersion` to `{ "precision": "major" }`. The state script prints `version-file: match` when the file holds the plan's version, `mismatch ` when it holds another, and `-` without the file or a `Release:` line. -When the repository has `.github/workflows/raise-baseline.yml`, that workflow opens the pull request that raises `PackageValidationBaselineVersion` once nuget.org lists a release: a plan never raises the baseline in a step or lists raising it under `## Follow-ups`. +When the repository has `.github/workflows/raise-baseline.yml`, that workflow pushes the branch that raises `PackageValidationBaselineVersion` once nuget.org lists a release and opens an issue whose link opens its pull request: a plan never raises the baseline in a step or lists raising it under `## Follow-ups`. Write the step so the executor copies text: it gives the heading, each entry under its group, and each link line in full. In a pre-release project, it gives each entry to add in full, and each entry to rewrite or delete by its first words and, for a rewrite, its new text in full. Only `` is left to the executor, with the `Get-Date` command. Never reformat a changelog in another format, or an older section of any changelog, unless the request asks for it, as an adopted project's follow-up does; a heading that `changelog-duplicates` names in an older release section stays as it is. A plan that converts a changelog keeps every entry's text. It dates each version's heading with its tag's date (`git log -1 --format=%as `), puts each entry in one group, and adds the preamble, `## [Unreleased]` and the link reference definitions. diff --git a/.github/skills/plan-docs/SKILL.md b/.github/skills/plan-docs/SKILL.md index fb9e27ab..992f7058 100644 --- a/.github/skills/plan-docs/SKILL.md +++ b/.github/skills/plan-docs/SKILL.md @@ -121,7 +121,7 @@ The plan's last step writes the plan's entries, for every plan: When the repository has a `version.json` at its root, which Nerdbank.GitVersioning builds each package's version from, and the plan has a `Release:` line, the same last step also sets that file's `version` to the `Release:` version without its leading `v`, such as `"1.4.0"` for `v1.4.0`, changing nothing else, and lists `version.json` on its Files line: a release tag whose commit holds another version publishes no package. When that version starts a new major version and the file's `assemblyVersion` names a `version`, the step also sets `assemblyVersion` to `{ "precision": "major" }`. The state script prints `version-file: match` when the file holds the plan's version, `mismatch ` when it holds another, and `-` without the file or a `Release:` line. -When the repository has `.github/workflows/raise-baseline.yml`, that workflow opens the pull request that raises `PackageValidationBaselineVersion` once nuget.org lists a release: a plan never raises the baseline in a step or lists raising it under `## Follow-ups`. +When the repository has `.github/workflows/raise-baseline.yml`, that workflow pushes the branch that raises `PackageValidationBaselineVersion` once nuget.org lists a release and opens an issue whose link opens its pull request: a plan never raises the baseline in a step or lists raising it under `## Follow-ups`. Write the step so the executor copies text: it gives the heading, each entry under its group, and each link line in full. In a pre-release project, it gives each entry to add in full, and each entry to rewrite or delete by its first words and, for a rewrite, its new text in full. Only `` is left to the executor, with the `Get-Date` command. Never reformat a changelog in another format, or an older section of any changelog, unless the request asks for it, as an adopted project's follow-up does; a heading that `changelog-duplicates` names in an older release section stays as it is. A plan that converts a changelog keeps every entry's text. It dates each version's heading with its tag's date (`git log -1 --format=%as `), puts each entry in one group, and adds the preamble, `## [Unreleased]` and the link reference definitions. diff --git a/.github/skills/plan-feature/SKILL.md b/.github/skills/plan-feature/SKILL.md index 2b57f7c8..c05ff507 100644 --- a/.github/skills/plan-feature/SKILL.md +++ b/.github/skills/plan-feature/SKILL.md @@ -123,7 +123,7 @@ The plan's last step writes the plan's entries, for every plan: When the repository has a `version.json` at its root, which Nerdbank.GitVersioning builds each package's version from, and the plan has a `Release:` line, the same last step also sets that file's `version` to the `Release:` version without its leading `v`, such as `"1.4.0"` for `v1.4.0`, changing nothing else, and lists `version.json` on its Files line: a release tag whose commit holds another version publishes no package. When that version starts a new major version and the file's `assemblyVersion` names a `version`, the step also sets `assemblyVersion` to `{ "precision": "major" }`. The state script prints `version-file: match` when the file holds the plan's version, `mismatch ` when it holds another, and `-` without the file or a `Release:` line. -When the repository has `.github/workflows/raise-baseline.yml`, that workflow opens the pull request that raises `PackageValidationBaselineVersion` once nuget.org lists a release: a plan never raises the baseline in a step or lists raising it under `## Follow-ups`. +When the repository has `.github/workflows/raise-baseline.yml`, that workflow pushes the branch that raises `PackageValidationBaselineVersion` once nuget.org lists a release and opens an issue whose link opens its pull request: a plan never raises the baseline in a step or lists raising it under `## Follow-ups`. Write the step so the executor copies text: it gives the heading, each entry under its group, and each link line in full. In a pre-release project, it gives each entry to add in full, and each entry to rewrite or delete by its first words and, for a rewrite, its new text in full. Only `` is left to the executor, with the `Get-Date` command. Never reformat a changelog in another format, or an older section of any changelog, unless the request asks for it, as an adopted project's follow-up does; a heading that `changelog-duplicates` names in an older release section stays as it is. A plan that converts a changelog keeps every entry's text. It dates each version's heading with its tag's date (`git log -1 --format=%as `), puts each entry in one group, and adds the preamble, `## [Unreleased]` and the link reference definitions. diff --git a/.github/skills/plan-issue/SKILL.md b/.github/skills/plan-issue/SKILL.md index 9a01b6ec..45e98de0 100644 --- a/.github/skills/plan-issue/SKILL.md +++ b/.github/skills/plan-issue/SKILL.md @@ -296,7 +296,7 @@ The plan's last step writes the plan's entries, for every plan: When the repository has a `version.json` at its root, which Nerdbank.GitVersioning builds each package's version from, and the plan has a `Release:` line, the same last step also sets that file's `version` to the `Release:` version without its leading `v`, such as `"1.4.0"` for `v1.4.0`, changing nothing else, and lists `version.json` on its Files line: a release tag whose commit holds another version publishes no package. When that version starts a new major version and the file's `assemblyVersion` names a `version`, the step also sets `assemblyVersion` to `{ "precision": "major" }`. The state script prints `version-file: match` when the file holds the plan's version, `mismatch ` when it holds another, and `-` without the file or a `Release:` line. -When the repository has `.github/workflows/raise-baseline.yml`, that workflow opens the pull request that raises `PackageValidationBaselineVersion` once nuget.org lists a release: a plan never raises the baseline in a step or lists raising it under `## Follow-ups`. +When the repository has `.github/workflows/raise-baseline.yml`, that workflow pushes the branch that raises `PackageValidationBaselineVersion` once nuget.org lists a release and opens an issue whose link opens its pull request: a plan never raises the baseline in a step or lists raising it under `## Follow-ups`. Write the step so the executor copies text: it gives the heading, each entry under its group, and each link line in full. In a pre-release project, it gives each entry to add in full, and each entry to rewrite or delete by its first words and, for a rewrite, its new text in full. Only `` is left to the executor, with the `Get-Date` command. Never reformat a changelog in another format, or an older section of any changelog, unless the request asks for it, as an adopted project's follow-up does; a heading that `changelog-duplicates` names in an older release section stays as it is. A plan that converts a changelog keeps every entry's text. It dates each version's heading with its tag's date (`git log -1 --format=%as `), puts each entry in one group, and adds the preamble, `## [Unreleased]` and the link reference definitions. diff --git a/.github/skills/plan-migration/SKILL.md b/.github/skills/plan-migration/SKILL.md index dc8b1ae5..94c4bc53 100644 --- a/.github/skills/plan-migration/SKILL.md +++ b/.github/skills/plan-migration/SKILL.md @@ -121,7 +121,7 @@ The plan's last step writes the plan's entries, for every plan: When the repository has a `version.json` at its root, which Nerdbank.GitVersioning builds each package's version from, and the plan has a `Release:` line, the same last step also sets that file's `version` to the `Release:` version without its leading `v`, such as `"1.4.0"` for `v1.4.0`, changing nothing else, and lists `version.json` on its Files line: a release tag whose commit holds another version publishes no package. When that version starts a new major version and the file's `assemblyVersion` names a `version`, the step also sets `assemblyVersion` to `{ "precision": "major" }`. The state script prints `version-file: match` when the file holds the plan's version, `mismatch ` when it holds another, and `-` without the file or a `Release:` line. -When the repository has `.github/workflows/raise-baseline.yml`, that workflow opens the pull request that raises `PackageValidationBaselineVersion` once nuget.org lists a release: a plan never raises the baseline in a step or lists raising it under `## Follow-ups`. +When the repository has `.github/workflows/raise-baseline.yml`, that workflow pushes the branch that raises `PackageValidationBaselineVersion` once nuget.org lists a release and opens an issue whose link opens its pull request: a plan never raises the baseline in a step or lists raising it under `## Follow-ups`. Write the step so the executor copies text: it gives the heading, each entry under its group, and each link line in full. In a pre-release project, it gives each entry to add in full, and each entry to rewrite or delete by its first words and, for a rewrite, its new text in full. Only `` is left to the executor, with the `Get-Date` command. Never reformat a changelog in another format, or an older section of any changelog, unless the request asks for it, as an adopted project's follow-up does; a heading that `changelog-duplicates` names in an older release section stays as it is. A plan that converts a changelog keeps every entry's text. It dates each version's heading with its tag's date (`git log -1 --format=%as `), puts each entry in one group, and adds the preamble, `## [Unreleased]` and the link reference definitions. diff --git a/.github/skills/plan-performance/SKILL.md b/.github/skills/plan-performance/SKILL.md index ac64d9f0..f6df8996 100644 --- a/.github/skills/plan-performance/SKILL.md +++ b/.github/skills/plan-performance/SKILL.md @@ -120,7 +120,7 @@ The plan's last step writes the plan's entries, for every plan: When the repository has a `version.json` at its root, which Nerdbank.GitVersioning builds each package's version from, and the plan has a `Release:` line, the same last step also sets that file's `version` to the `Release:` version without its leading `v`, such as `"1.4.0"` for `v1.4.0`, changing nothing else, and lists `version.json` on its Files line: a release tag whose commit holds another version publishes no package. When that version starts a new major version and the file's `assemblyVersion` names a `version`, the step also sets `assemblyVersion` to `{ "precision": "major" }`. The state script prints `version-file: match` when the file holds the plan's version, `mismatch ` when it holds another, and `-` without the file or a `Release:` line. -When the repository has `.github/workflows/raise-baseline.yml`, that workflow opens the pull request that raises `PackageValidationBaselineVersion` once nuget.org lists a release: a plan never raises the baseline in a step or lists raising it under `## Follow-ups`. +When the repository has `.github/workflows/raise-baseline.yml`, that workflow pushes the branch that raises `PackageValidationBaselineVersion` once nuget.org lists a release and opens an issue whose link opens its pull request: a plan never raises the baseline in a step or lists raising it under `## Follow-ups`. Write the step so the executor copies text: it gives the heading, each entry under its group, and each link line in full. In a pre-release project, it gives each entry to add in full, and each entry to rewrite or delete by its first words and, for a rewrite, its new text in full. Only `` is left to the executor, with the `Get-Date` command. Never reformat a changelog in another format, or an older section of any changelog, unless the request asks for it, as an adopted project's follow-up does; a heading that `changelog-duplicates` names in an older release section stays as it is. A plan that converts a changelog keeps every entry's text. It dates each version's heading with its tag's date (`git log -1 --format=%as `), puts each entry in one group, and adds the preamble, `## [Unreleased]` and the link reference definitions. diff --git a/.github/skills/plan-refactor/SKILL.md b/.github/skills/plan-refactor/SKILL.md index 253a4574..df01206e 100644 --- a/.github/skills/plan-refactor/SKILL.md +++ b/.github/skills/plan-refactor/SKILL.md @@ -122,7 +122,7 @@ The plan's last step writes the plan's entries, for every plan: When the repository has a `version.json` at its root, which Nerdbank.GitVersioning builds each package's version from, and the plan has a `Release:` line, the same last step also sets that file's `version` to the `Release:` version without its leading `v`, such as `"1.4.0"` for `v1.4.0`, changing nothing else, and lists `version.json` on its Files line: a release tag whose commit holds another version publishes no package. When that version starts a new major version and the file's `assemblyVersion` names a `version`, the step also sets `assemblyVersion` to `{ "precision": "major" }`. The state script prints `version-file: match` when the file holds the plan's version, `mismatch ` when it holds another, and `-` without the file or a `Release:` line. -When the repository has `.github/workflows/raise-baseline.yml`, that workflow opens the pull request that raises `PackageValidationBaselineVersion` once nuget.org lists a release: a plan never raises the baseline in a step or lists raising it under `## Follow-ups`. +When the repository has `.github/workflows/raise-baseline.yml`, that workflow pushes the branch that raises `PackageValidationBaselineVersion` once nuget.org lists a release and opens an issue whose link opens its pull request: a plan never raises the baseline in a step or lists raising it under `## Follow-ups`. Write the step so the executor copies text: it gives the heading, each entry under its group, and each link line in full. In a pre-release project, it gives each entry to add in full, and each entry to rewrite or delete by its first words and, for a rewrite, its new text in full. Only `` is left to the executor, with the `Get-Date` command. Never reformat a changelog in another format, or an older section of any changelog, unless the request asks for it, as an adopted project's follow-up does; a heading that `changelog-duplicates` names in an older release section stays as it is. A plan that converts a changelog keeps every entry's text. It dates each version's heading with its tag's date (`git log -1 --format=%as `), puts each entry in one group, and adds the preamble, `## [Unreleased]` and the link reference definitions. diff --git a/.github/skills/plan-security/SKILL.md b/.github/skills/plan-security/SKILL.md index 0a7d03b6..909c9a02 100644 --- a/.github/skills/plan-security/SKILL.md +++ b/.github/skills/plan-security/SKILL.md @@ -120,7 +120,7 @@ The plan's last step writes the plan's entries, for every plan: When the repository has a `version.json` at its root, which Nerdbank.GitVersioning builds each package's version from, and the plan has a `Release:` line, the same last step also sets that file's `version` to the `Release:` version without its leading `v`, such as `"1.4.0"` for `v1.4.0`, changing nothing else, and lists `version.json` on its Files line: a release tag whose commit holds another version publishes no package. When that version starts a new major version and the file's `assemblyVersion` names a `version`, the step also sets `assemblyVersion` to `{ "precision": "major" }`. The state script prints `version-file: match` when the file holds the plan's version, `mismatch ` when it holds another, and `-` without the file or a `Release:` line. -When the repository has `.github/workflows/raise-baseline.yml`, that workflow opens the pull request that raises `PackageValidationBaselineVersion` once nuget.org lists a release: a plan never raises the baseline in a step or lists raising it under `## Follow-ups`. +When the repository has `.github/workflows/raise-baseline.yml`, that workflow pushes the branch that raises `PackageValidationBaselineVersion` once nuget.org lists a release and opens an issue whose link opens its pull request: a plan never raises the baseline in a step or lists raising it under `## Follow-ups`. Write the step so the executor copies text: it gives the heading, each entry under its group, and each link line in full. In a pre-release project, it gives each entry to add in full, and each entry to rewrite or delete by its first words and, for a rewrite, its new text in full. Only `` is left to the executor, with the `Get-Date` command. Never reformat a changelog in another format, or an older section of any changelog, unless the request asks for it, as an adopted project's follow-up does; a heading that `changelog-duplicates` names in an older release section stays as it is. A plan that converts a changelog keeps every entry's text. It dates each version's heading with its tag's date (`git log -1 --format=%as `), puts each entry in one group, and adds the preamble, `## [Unreleased]` and the link reference definitions. diff --git a/.github/skills/plan-template-update/SKILL.md b/.github/skills/plan-template-update/SKILL.md index ef4e9f8f..5c71b7a8 100644 --- a/.github/skills/plan-template-update/SKILL.md +++ b/.github/skills/plan-template-update/SKILL.md @@ -135,7 +135,7 @@ The plan's last step writes the plan's entries, for every plan: When the repository has a `version.json` at its root, which Nerdbank.GitVersioning builds each package's version from, and the plan has a `Release:` line, the same last step also sets that file's `version` to the `Release:` version without its leading `v`, such as `"1.4.0"` for `v1.4.0`, changing nothing else, and lists `version.json` on its Files line: a release tag whose commit holds another version publishes no package. When that version starts a new major version and the file's `assemblyVersion` names a `version`, the step also sets `assemblyVersion` to `{ "precision": "major" }`. The state script prints `version-file: match` when the file holds the plan's version, `mismatch ` when it holds another, and `-` without the file or a `Release:` line. -When the repository has `.github/workflows/raise-baseline.yml`, that workflow opens the pull request that raises `PackageValidationBaselineVersion` once nuget.org lists a release: a plan never raises the baseline in a step or lists raising it under `## Follow-ups`. +When the repository has `.github/workflows/raise-baseline.yml`, that workflow pushes the branch that raises `PackageValidationBaselineVersion` once nuget.org lists a release and opens an issue whose link opens its pull request: a plan never raises the baseline in a step or lists raising it under `## Follow-ups`. Write the step so the executor copies text: it gives the heading, each entry under its group, and each link line in full. In a pre-release project, it gives each entry to add in full, and each entry to rewrite or delete by its first words and, for a rewrite, its new text in full. Only `` is left to the executor, with the `Get-Date` command. Never reformat a changelog in another format, or an older section of any changelog, unless the request asks for it, as an adopted project's follow-up does; a heading that `changelog-duplicates` names in an older release section stays as it is. A plan that converts a changelog keeps every entry's text. It dates each version's heading with its tag's date (`git log -1 --format=%as `), puts each entry in one group, and adds the preamble, `## [Unreleased]` and the link reference definitions. diff --git a/.github/skills/plan-tests/SKILL.md b/.github/skills/plan-tests/SKILL.md index 67c326ec..3d258e28 100644 --- a/.github/skills/plan-tests/SKILL.md +++ b/.github/skills/plan-tests/SKILL.md @@ -121,7 +121,7 @@ The plan's last step writes the plan's entries, for every plan: When the repository has a `version.json` at its root, which Nerdbank.GitVersioning builds each package's version from, and the plan has a `Release:` line, the same last step also sets that file's `version` to the `Release:` version without its leading `v`, such as `"1.4.0"` for `v1.4.0`, changing nothing else, and lists `version.json` on its Files line: a release tag whose commit holds another version publishes no package. When that version starts a new major version and the file's `assemblyVersion` names a `version`, the step also sets `assemblyVersion` to `{ "precision": "major" }`. The state script prints `version-file: match` when the file holds the plan's version, `mismatch ` when it holds another, and `-` without the file or a `Release:` line. -When the repository has `.github/workflows/raise-baseline.yml`, that workflow opens the pull request that raises `PackageValidationBaselineVersion` once nuget.org lists a release: a plan never raises the baseline in a step or lists raising it under `## Follow-ups`. +When the repository has `.github/workflows/raise-baseline.yml`, that workflow pushes the branch that raises `PackageValidationBaselineVersion` once nuget.org lists a release and opens an issue whose link opens its pull request: a plan never raises the baseline in a step or lists raising it under `## Follow-ups`. Write the step so the executor copies text: it gives the heading, each entry under its group, and each link line in full. In a pre-release project, it gives each entry to add in full, and each entry to rewrite or delete by its first words and, for a rewrite, its new text in full. Only `` is left to the executor, with the `Get-Date` command. Never reformat a changelog in another format, or an older section of any changelog, unless the request asks for it, as an adopted project's follow-up does; a heading that `changelog-duplicates` names in an older release section stays as it is. A plan that converts a changelog keeps every entry's text. It dates each version's heading with its tag's date (`git log -1 --format=%as `), puts each entry in one group, and adds the preamble, `## [Unreleased]` and the link reference definitions. diff --git a/.github/skills/ship-plan/SKILL.md b/.github/skills/ship-plan/SKILL.md index a79c5262..65bfb25a 100644 --- a/.github/skills/ship-plan/SKILL.md +++ b/.github/skills/ship-plan/SKILL.md @@ -109,7 +109,7 @@ The plan's last step writes the plan's entries, for every plan: When the repository has a `version.json` at its root, which Nerdbank.GitVersioning builds each package's version from, and the plan has a `Release:` line, the same last step also sets that file's `version` to the `Release:` version without its leading `v`, such as `"1.4.0"` for `v1.4.0`, changing nothing else, and lists `version.json` on its Files line: a release tag whose commit holds another version publishes no package. When that version starts a new major version and the file's `assemblyVersion` names a `version`, the step also sets `assemblyVersion` to `{ "precision": "major" }`. The state script prints `version-file: match` when the file holds the plan's version, `mismatch ` when it holds another, and `-` without the file or a `Release:` line. -When the repository has `.github/workflows/raise-baseline.yml`, that workflow opens the pull request that raises `PackageValidationBaselineVersion` once nuget.org lists a release: a plan never raises the baseline in a step or lists raising it under `## Follow-ups`. +When the repository has `.github/workflows/raise-baseline.yml`, that workflow pushes the branch that raises `PackageValidationBaselineVersion` once nuget.org lists a release and opens an issue whose link opens its pull request: a plan never raises the baseline in a step or lists raising it under `## Follow-ups`. Write the step so the executor copies text: it gives the heading, each entry under its group, and each link line in full. In a pre-release project, it gives each entry to add in full, and each entry to rewrite or delete by its first words and, for a rewrite, its new text in full. Only `` is left to the executor, with the `Get-Date` command. Never reformat a changelog in another format, or an older section of any changelog, unless the request asks for it, as an adopted project's follow-up does; a heading that `changelog-duplicates` names in an older release section stays as it is. A plan that converts a changelog keeps every entry's text. It dates each version's heading with its tag's date (`git log -1 --format=%as `), puts each entry in one group, and adds the preamble, `## [Unreleased]` and the link reference definitions. diff --git a/CHANGELOG.md b/CHANGELOG.md index 535e93b1..4dc098c7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,17 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), ## [Unreleased] +## [0.111.0] - 2026-11-21 + +### Added + +- Where NCode Review's approver app is set up (`code-review.yml` passes `approver-private-key` and the repository's `code-review` environment holds `NCODE_REVIEW_APPROVER_PRIVATE_KEY`), `tools/Set-RepositoryBaseline.ps1` requires one approval, of the last push, with one writer too, since GitHub counts an approval from a reviewer that can write; the template's `code-review.yml` pins NCode Review v1.5.0 and passes the approver's key, and `.template/Update-Project.ps1` says when a project's `code-review.yml` pins NCode Review before v1.5.0 or passes `approve: true` without `approver-private-key` ([#460](https://github.com/NCodeGroup/project-template/issues/460), ADR-0036). + +### Changed + +- Every repository's workflow token is read-only and GitHub Actions can't approve pull requests, also where `raise-baseline.yml` is, and `tools/Set-RepositoryBaseline.ps1 -OrganizationPolicy` sets the organization's defaults the same way ([#461](https://github.com/NCodeGroup/project-template/issues/461), ADR-0036). +- `raise-baseline.yml` pushes `baseline-` and opens an issue whose link opens the pull request, which starts CI and NCode Review's review, instead of opening a draft pull request and starting CI itself ([#460](https://github.com/NCodeGroup/project-template/issues/460), ADR-0036). + ## [0.110.0] - 2026-11-20 ### Added @@ -1788,7 +1799,8 @@ To run the v0.9.0 logic on the first update instead, run the wrapper from a clon - The .NET layer: `build/ProjectTemplate.props` (latest C#, nullable reference types, implicit usings, warnings as errors, `ContinuousIntegrationBuild` when `CI=true`, author metadata), central package management in `Directory.Packages.props`, the SDK in `global.json`, and C# conventions for Copilot and Claude Code. - CI on GitHub or GitLab that runs the build and test commands, with GitHub Actions pinned to commit SHAs, and on GitHub, Dependabot for the CI actions and, by stack, packages and the .NET SDK. -[unreleased]: https://github.com/NCodeGroup/project-template/compare/v0.110.0...HEAD +[unreleased]: https://github.com/NCodeGroup/project-template/compare/v0.111.0...HEAD +[0.111.0]: https://github.com/NCodeGroup/project-template/compare/v0.110.0...v0.111.0 [0.110.0]: https://github.com/NCodeGroup/project-template/compare/v0.109.0...v0.110.0 [0.109.0]: https://github.com/NCodeGroup/project-template/compare/v0.108.0...v0.109.0 [0.108.0]: https://github.com/NCodeGroup/project-template/compare/v0.107.0...v0.108.0 diff --git a/README.md b/README.md index e83d7d4a..11162c1a 100644 --- a/README.md +++ b/README.md @@ -125,8 +125,8 @@ Written once, when the project is created, and never touched by an update, even | `NCodeGroup.png` (.NET, `nuget_package`) | The NCode Group package icon, the `{N}` mark on a blue tile at 128 by 128 pixels, when `package_icon` names it, the default for the author NCode Group | | `.github/workflows/publish.yml` (GitHub, .NET, `nuget_package`) | Publishes the packages to nuget.org when a GitHub release is published, or when `tag-release.yml` starts it for the release it published: refuses a tag whose commit the default branch doesn't hold, so a tag on an unreviewed commit publishes nothing, packs in Release as a public release, with the version `version.json` holds, which must be the tag's, then pushes through nuget.org trusted publishing (OIDC, no stored API key) in the protected `nuget` environment, with every action pinned to a full commit SHA. Before testing it installs the SDK `global.json` selects and the runtimes `build/Get-TestRuntimes.ps1` names with the `.github/actions/install-dotnet` action, and it counts only a 404 from nuget.org as a package not published yet, stopping on any other failed lookup. `Update-Project.ps1` and `Adopt-Project.ps1` leave it out of a repository where another workflow runs `nuget push`, and the update warns when both do; they record that workflow in the `nuget_publisher` answer, which also leaves out `release-provenance.yml` and `raise-baseline.yml` and has the documents name it. Needs a one-time setup, which its header describes: a trusted publishing policy on nuget.org, the `nuget` environment and the `NUGET_USER` variable. Its `provenance` and `baseline` jobs call the release follow-ups ([ADR-0151](template/docs/decisions/project-template/0151-release-follow-ups-are-jobs-publish-calls.md)); the update and adoption say what to add to one that doesn't | | `.github/workflows/release-provenance.yml` (GitHub, .NET, `nuget_package`) | Called by `publish.yml` after its publish job, or by hand with a tag and the id of a Publish packages run whose artifact is kept (14 days), attests the packages with GitHub's build provenance and attaches them and `.intoto.jsonl` to the release, and an SPDX SBOM from GitHub's dependency graph (`.spdx.json`); left out where the `nuget_publisher` answer names the library's own publishing workflow (ADR-0139, [ADR-0151](template/docs/decisions/project-template/0151-release-follow-ups-are-jobs-publish-calls.md)) | -| `.github/workflows/raise-baseline.yml` (GitHub, .NET, `nuget_package`) | Called by `publish.yml` after it publishes a stable release, or by hand with a tag, runs `build/Update-Baseline.ps1`, pushes `baseline-`, opens a draft pull request that names each `CompatibilitySuppressions.xml` the script deleted or edited, and starts `ci.yml` on its branch, with a checkout that keeps no credential; needs "Allow GitHub Actions to create and approve pull requests", which `tools/Set-RepositoryBaseline.ps1` turns on where this file is; left out where the `nuget_publisher` answer names the library's own publishing workflow (ADR-0150) | -| `.github/workflows/code-review.yml` (GitHub, `code_review` answer only) | Reviews each pull request with the NCode Review bot ([NCodeGroup/code-review](https://github.com/NCodeGroup/code-review)): runs from the default branch on `pull_request_target`, in the `code-review` environment, and, in a separate `outcomes` job outside that environment, with no `id-token`, checkout or model key and only `contents: read` and `pull-requests: read`, records each finding's outcome when a pull request closes; both jobs pin the action to a release's full commit SHA, with its tag in a comment, the one pin CodeQL's `actions/unpinned-tag` query accepts. Project-owned so an update never moves a pin Dependabot bumped; `Update-Project.ps1` lists the template's changes to it. Nothing requires its "Code review" check: the person who merges waits for the review ([ADR-0019](template/docs/decisions/project-template/0019-nothing-requires-the-code-review-check-the-person-who-merges-waits-for-it.md.jinja)). The review passes `approve: true`, which the baseline ruleset then requires ([ADR-0022](template/docs/decisions/project-template/0022-ncode-reviews-approval-gates-the-merge.md.jinja)) | +| `.github/workflows/raise-baseline.yml` (GitHub, .NET, `nuget_package`) | Called by `publish.yml` after it publishes a stable release, or by hand with a tag, runs `build/Update-Baseline.ps1`, pushes `baseline-` and opens an issue whose link opens its pull request, which names each `CompatibilitySuppressions.xml` the script deleted or edited, with a checkout that keeps no credential; needs no Actions approval setting, which `tools/Set-RepositoryBaseline.ps1` keeps off; left out where the `nuget_publisher` answer names the library's own publishing workflow (ADR-0150, ADR-0036) | +| `.github/workflows/code-review.yml` (GitHub, `code_review` answer only) | Reviews each pull request with the NCode Review bot ([NCodeGroup/code-review](https://github.com/NCodeGroup/code-review)): runs from the default branch on `pull_request_target`, in the `code-review` environment, and, in a separate `outcomes` job outside that environment, with no `id-token`, checkout or model key and only `contents: read` and `pull-requests: read`, records each finding's outcome when a pull request closes; both jobs pin the action to a release's full commit SHA, with its tag in a comment, the one pin CodeQL's `actions/unpinned-tag` query accepts. Project-owned so an update never moves a pin Dependabot bumped; `Update-Project.ps1` lists the template's changes to it. Nothing requires its "Code review" check: the person who merges waits for the review ([ADR-0019](template/docs/decisions/project-template/0019-nothing-requires-the-code-review-check-the-person-who-merges-waits-for-it.md.jinja)). The review passes `approve: true`, which the baseline ruleset requires as one approval where NCode Review's approver is set up, or where a second person can write ([ADR-0022](template/docs/decisions/project-template/0022-ncode-reviews-approval-gates-the-merge.md.jinja)) | ## Claude Code or GitHub Copilot @@ -329,11 +329,11 @@ To handle another setup, add a script to `tools/adopt/legacy/`; nothing else cha ## Protect the Default Branch -A repository on GitHub should take changes only through pull requests, whatever its CI is. `tools/Set-RepositoryBaseline.ps1` gives a repository a "Protect main" ruleset on its default branch, the same shape as this repository's: no deletion, no force push, a pull request required with every conversation resolved (a finding from the review bot, CodeQL or a person blocks the merge until it is resolved), merge-commit or rebase merges only (never squash, so each commit of a plan stays on the branch, as a project's ADR-0013 records; a project that squash-merges, such as through a merge queue, supersedes that one record), where CodeQL's default setup is configured and analyzes at least one language, a code-scanning rule that blocks a pull request whose CodeQL results add an alert at warning level or above or a security alert of any severity, no bypass; the ruleset also dismisses stale approvals on a push, which an earlier run's "Protect main" ruleset gets on the next run, like conversation resolution, and a ruleset of the owner's keeps its shape. It requires no approval, except where the default branch's `.github/workflows/code-review.yml` passes `approve: true` and a second person has write access: there one approval, of the last push ([ADR-0022](template/docs/decisions/project-template/0022-ncode-reviews-approval-gates-the-merge.md.jinja)). Where one person has write access, counted as the users the repository's collaborators list gives with push access or more, it requires no approval and no approval of the last push, even with `approve: true`, and turns both off in a "Protect main" that requires an approval, saying so, also with `-WhatIf`: GitHub counts toward a required approval only a review from someone with write access, never the author's, and NCode Review's app has none, so on NCodeGroup/PropertyBag#53 its approval left "Approvals, 1 still required" ([ADR-0034](template/docs/decisions/project-template/0034-with-one-writer-the-baseline-requires-no-approval.md)). A collaborators list it can't read is named, and the ruleset then gets no approval it doesn't have and keeps those it has. A ruleset of the owner's that requires an approval keeps its shape, and with one writer the run prints a notice with the command that requires no approval and no approval of the last push in it, as it does when GitHub refuses the change to "Protect main". It never requires approval of the last push without an approval: GitHub then waits for an approval from someone other than the pusher and never lets an author approve their own pull request, so every merge stays blocked where one maintainer authors every pull request, as it did NCodeGroup/docs on 2026-11-16. A "Protect main" ruleset that has it on with no approval required, which an older run or a hand-made ruleset of that name can, gets it turned off, and the run says so, also with `-WhatIf` ([ADR-0031](template/docs/decisions/project-template/0031-the-baseline-turns-off-approval-of-the-last-push-where-no-approval-is-required.md.jinja)); one that requires approvals keeps it. For a ruleset of the owner's that has it on with no approval, and for "Protect main" where GitHub refuses the change, it prints the `gh api` command that turns it off, and `-All -WhatIf` lists them; `-RequireChecks` adds the CI jobs a pull request must pass as required status checks, on a branch that is up to date with the default branch. Where it reads CodeQL's default setup as configured with a language to analyze, it switches the setup to the extended query suite, before it writes the ruleset, so a refused switch changes nothing and the next run retries it. GitHub can report a default setup as configured with no language: on 2026-11-16 NCodeGroup/docs and NCodeGroup/brand answered `"state":"configured","languages":[]`, their organization's enforced security configuration having turned default setup on before any CodeQL setup ran there, so CodeQL ran on no pull request and the rule blocked every one, with every check green. The script counts such a setup as not configured: it leaves the rule out, says why, and switches no suite, since the switch sends `query_suite` alone and sets up no language; a later run with `-RequireChecks` adds the rule once the repository's settings give CodeQL a language ([ADR-0030](template/docs/decisions/project-template/0030-the-code-scanning-rule-is-added-only-where-codeql-analyzes-a-language.md)). A "Protect main" ruleset that already has a code-scanning rule, such as one an older version of the script made, keeps that rule and its alert thresholds, and the script never switches that repository's suite, since the extended suite can raise new alerts the rule would then block merges on: it reads the default setup and, when it runs another suite, prints a notice with the `gh api` command that switches it by hand. Where the setup is configured but analyzes no language and the rule requires CodeQL, it warns instead that every pull request stays blocked, and names the fix: set up CodeQL's languages in the repository's settings (Settings > Advanced Security > CodeQL analysis), or remove the rule, which the script never does. It prints the notice or the warning also for a "Protect main" that sits beside a ruleset of the owner's. A default-branch ruleset that already requires pull requests, its own or one someone else shaped, keeps its shape, but the script turns on its conversation resolution where it is off, changing nothing else in it, so every repository blocks a merge until each discussion is resolved, as a project's ADR-0014 records. It also turns on delete-branch-on-merge. +A repository on GitHub should take changes only through pull requests, whatever its CI is. `tools/Set-RepositoryBaseline.ps1` gives a repository a "Protect main" ruleset on its default branch, the same shape as this repository's: no deletion, no force push, a pull request required with every conversation resolved (a finding from the review bot, CodeQL or a person blocks the merge until it is resolved), merge-commit or rebase merges only (never squash, so each commit of a plan stays on the branch, as a project's ADR-0013 records; a project that squash-merges, such as through a merge queue, supersedes that one record), where CodeQL's default setup is configured and analyzes at least one language, a code-scanning rule that blocks a pull request whose CodeQL results add an alert at warning level or above or a security alert of any severity, no bypass; the ruleset also dismisses stale approvals on a push, which an earlier run's "Protect main" ruleset gets on the next run, like conversation resolution, and a ruleset of the owner's keeps its shape. It requires no approval, except where NCode Review's approver is set up, or the default branch's `.github/workflows/code-review.yml` passes `approve: true` and a second person has write access: there one approval, of the last push ([ADR-0022](template/docs/decisions/project-template/0022-ncode-reviews-approval-gates-the-merge.md.jinja)). Where one person has write access, counted as the users the repository's collaborators list gives with push access or more, and NCode Review's approver isn't set up, it requires no approval and no approval of the last push, even with `approve: true`, and turns both off in a "Protect main" that requires an approval, saying so, also with `-WhatIf`: GitHub counts toward a required approval only a review from someone with write access, never the author's, and NCode Review's app has none, so on NCodeGroup/PropertyBag#53 its approval left "Approvals, 1 still required" ([ADR-0034](template/docs/decisions/project-template/0034-with-one-writer-the-baseline-requires-no-approval.md)). NCode Review's approver is set up where `code-review.yml` passes `approve: true` and `approver-private-key`, and the repository's `code-review` environment holds `NCODE_REVIEW_APPROVER_PRIVATE_KEY`: the NCode Review Approver, an app that can write, submits the approval with a token that can only write pull requests, so the ruleset requires one approval, of the last push, with one writer too; with the input but no secret, the run names `tools/Enable-CodeReview.ps1 -ApproverPrivateKeyPath` from NCodeGroup/code-review and requires no approval for it ([ADR-0036](template/docs/decisions/project-template/0036-a-required-approval-is-met-by-ncode-reviews-approver-app.md)). A collaborators list it can't read is named, and the ruleset then gets no approval it doesn't have and keeps those it has. A ruleset of the owner's that requires an approval keeps its shape, and with one writer the run prints a notice with the command that requires no approval and no approval of the last push in it, as it does when GitHub refuses the change to "Protect main". It never requires approval of the last push without an approval: GitHub then waits for an approval from someone other than the pusher and never lets an author approve their own pull request, so every merge stays blocked where one maintainer authors every pull request, as it did NCodeGroup/docs on 2026-11-16. A "Protect main" ruleset that has it on with no approval required, which an older run or a hand-made ruleset of that name can, gets it turned off, and the run says so, also with `-WhatIf` ([ADR-0031](template/docs/decisions/project-template/0031-the-baseline-turns-off-approval-of-the-last-push-where-no-approval-is-required.md.jinja)); one that requires approvals keeps it. For a ruleset of the owner's that has it on with no approval, and for "Protect main" where GitHub refuses the change, it prints the `gh api` command that turns it off, and `-All -WhatIf` lists them; `-RequireChecks` adds the CI jobs a pull request must pass as required status checks, on a branch that is up to date with the default branch. Where it reads CodeQL's default setup as configured with a language to analyze, it switches the setup to the extended query suite, before it writes the ruleset, so a refused switch changes nothing and the next run retries it. GitHub can report a default setup as configured with no language: on 2026-11-16 NCodeGroup/docs and NCodeGroup/brand answered `"state":"configured","languages":[]`, their organization's enforced security configuration having turned default setup on before any CodeQL setup ran there, so CodeQL ran on no pull request and the rule blocked every one, with every check green. The script counts such a setup as not configured: it leaves the rule out, says why, and switches no suite, since the switch sends `query_suite` alone and sets up no language; a later run with `-RequireChecks` adds the rule once the repository's settings give CodeQL a language ([ADR-0030](template/docs/decisions/project-template/0030-the-code-scanning-rule-is-added-only-where-codeql-analyzes-a-language.md)). A "Protect main" ruleset that already has a code-scanning rule, such as one an older version of the script made, keeps that rule and its alert thresholds, and the script never switches that repository's suite, since the extended suite can raise new alerts the rule would then block merges on: it reads the default setup and, when it runs another suite, prints a notice with the `gh api` command that switches it by hand. Where the setup is configured but analyzes no language and the rule requires CodeQL, it warns instead that every pull request stays blocked, and names the fix: set up CodeQL's languages in the repository's settings (Settings > Advanced Security > CodeQL analysis), or remove the rule, which the script never does. It prints the notice or the warning also for a "Protect main" that sits beside a ruleset of the owner's. A default-branch ruleset that already requires pull requests, its own or one someone else shaped, keeps its shape, but the script turns on its conversation resolution where it is off, changing nothing else in it, so every repository blocks a merge until each discussion is resolved, as a project's ADR-0014 records. It also turns on delete-branch-on-merge. It gives the repository a "Protect release tags" ruleset too, on the tags matching `v*`: no deletion and no update, so a release tag is never moved, with no bypass. A release tag names one published package set, so it never changes; creating one stays open, so the Tag and publish release workflow's `GITHUB_TOKEN` can tag a release as its pull request merges, and `/ship-plan` can when that workflow didn't. A ruleset of that name is left alone whatever its state, and so is an active tag ruleset on `v*` tags, or on every tag, that already refuses both deletion and update. -It then turns on the security settings a public project should have, each where it is off: the workflow token (`GITHUB_TOKEN`) read-only by default, with GitHub Actions not allowed to approve pull requests, except that a repository with `.github/workflows/raise-baseline.yml` lets Actions create and approve pull requests, which GitHub sets together, so that workflow can open its pull request (an approval from Actions would count where the ruleset requires NCode Review's, and no template workflow gives one; ADR-0150, ADR-0151); secret scanning and its push protection; Dependabot alerts and Dependabot security updates, which need the alerts; private vulnerability reporting; and immutable releases, after which GitHub signs an attestation of each release it publishes, which `gh release verify` checks, except where a `.yml` or `.yaml` file in the default branch's `.github/workflows` runs on a `release` event or uploads release assets (`gh release upload`, `actions/upload-release-asset`, `softprops/action-gh-release` or `uploadReleaseAsset`), such as `release-provenance.yml`, which attaches a library's packages to its release, or a project's own workflow that attaches files, since an immutable release refuses a file attached after it is published, or where it can't read one, and with `-SkipImmutableReleases`; the line names the files, and `.template/Update-Project.ps1` then says to delete `SECURITY.md`'s "Releases are immutable" paragraph (`Adopt-Project.ps1` prints the same note); where they are already on and such a workflow exists, it prints a notice with the `gh api -X DELETE` command that turns them off, since it never loosens a setting ([ADR-0028](template/docs/decisions/project-template/0028-github-releases-are-immutable-and-their-tags-signed.md)). Each is read first and reported as set, already set, would set (with `-WhatIf`) or not available, with the reason, and none costs money: secret scanning and its push protection are left out of a repository that isn't public, where they need the paid GitHub Secret Protection. A setting the API won't read or refuses to change, such as private vulnerability reporting on a private repository, or a token setting the organization decides, is reported, and the run goes on with the next one. Requiring actions to be pinned to a full-length commit SHA is left out: it fails every workflow that names an action by tag, which an adopted repository's workflows may. +It then turns on the security settings a public project should have, each where it is off: the workflow token (`GITHUB_TOKEN`) read-only by default, with GitHub Actions not allowed to create or approve pull requests, in every repository, since any workflow's approval would count toward a required approval, and `raise-baseline.yml` opens no pull request itself (ADR-0036); `-OrganizationPolicy` sets the organization's defaults the same way; secret scanning and its push protection; Dependabot alerts and Dependabot security updates, which need the alerts; private vulnerability reporting; and immutable releases, after which GitHub signs an attestation of each release it publishes, which `gh release verify` checks, except where a `.yml` or `.yaml` file in the default branch's `.github/workflows` runs on a `release` event or uploads release assets (`gh release upload`, `actions/upload-release-asset`, `softprops/action-gh-release` or `uploadReleaseAsset`), such as `release-provenance.yml`, which attaches a library's packages to its release, or a project's own workflow that attaches files, since an immutable release refuses a file attached after it is published, or where it can't read one, and with `-SkipImmutableReleases`; the line names the files, and `.template/Update-Project.ps1` then says to delete `SECURITY.md`'s "Releases are immutable" paragraph (`Adopt-Project.ps1` prints the same note); where they are already on and such a workflow exists, it prints a notice with the `gh api -X DELETE` command that turns them off, since it never loosens a setting ([ADR-0028](template/docs/decisions/project-template/0028-github-releases-are-immutable-and-their-tags-signed.md)). Each is read first and reported as set, already set, would set (with `-WhatIf`) or not available, with the reason, and none costs money: secret scanning and its push protection are left out of a repository that isn't public, where they need the paid GitHub Secret Protection. A setting the API won't read or refuses to change, such as private vulnerability reporting on a private repository, or a token setting the organization decides, is reported, and the run goes on with the next one. Requiring actions to be pinned to a full-length commit SHA is left out: it fails every workflow that names an action by tag, which an adopted repository's workflows may. Last, it allows auto-merge where it is off, read and reported the same way, so `.github/workflows/code-review-auto-merge.yml` can have a Dependabot bump of NCode Review merge itself ([Stay Current](#stay-current)). Allowing it merges nothing by itself: a pull request merges itself only once someone, or that workflow, turns auto-merge on, and still waits for what the ruleset requires and merges only as it allows. @@ -428,7 +428,7 @@ No license: the license answer is blank and the repository has no LICENSE or COP When the `best_practices_project` answer is set and `README.md` doesn't show the project's OpenSSF Best Practices badge, the update says so, also when the project is already up to date, and prints the line to add near the top of `README.md`, which `documentation_achievements` asks for within 48 hours of earning a level: `README.md` is project-owned, so the template never adds it there ([ADR-0025](template/docs/decisions/project-template/0025-every-best-practices-criterion-is-mapped-in-a-template-owned-page.md)). -With NCode Review, when `.github/workflows/code-review.yml` pins `NCodeGroup/code-review` before v1.4.0 or passes no `approve: true`, or `AGENTS.md`'s Landing section doesn't say `draft: yes`, the update says what to change, also when the project is already up to date, and to run `tools/Set-RepositoryBaseline.ps1` again, so the default branch requires one approval, of the last push, once a second person has write access, and none with one writer, since GitHub counts no approval from NCode Review ([ADR-0022](template/docs/decisions/project-template/0022-ncode-reviews-approval-gates-the-merge.md.jinja), [ADR-0034](template/docs/decisions/project-template/0034-with-one-writer-the-baseline-requires-no-approval.md)). Both files are the project's, so the update changes neither. +With NCode Review, when `.github/workflows/code-review.yml` pins `NCodeGroup/code-review` before v1.5.0, passes no `approve: true` or passes it without `approver-private-key`, or `AGENTS.md`'s Landing section doesn't say `draft: yes`, the update says what to change, also when the project is already up to date, to store the approver's key with NCodeGroup/code-review's `tools/Enable-CodeReview.ps1 -ApproverPrivateKeyPath`, and to run `tools/Set-RepositoryBaseline.ps1` again, so the default branch requires one approval, of the last push, once NCode Review's approver is set up or a second person has write access, and none with one writer, since GitHub counts no approval from NCode Review ([ADR-0022](template/docs/decisions/project-template/0022-ncode-reviews-approval-gates-the-merge.md.jinja), [ADR-0034](template/docs/decisions/project-template/0034-with-one-writer-the-baseline-requires-no-approval.md)). Both files are the project's, so the update changes neither. When the project has version tags merged into the current branch that its changelog has no section for, such as releases from before it had a changelog, the update ends with a request to backfill them: @@ -594,7 +594,7 @@ A Dependabot pull request that only moves the NCode Review pin in `.github/workf | `tests/Test-BestPracticesCriteria.ps1`: every criterion of the passing, silver and gold levels in ossf/best-practices-badge's `criteria/criteria.yml`, read from GitHub, has one row at its level in `template/docs/best-practices-criteria.md.jinja`, with the requirement, N/A and URL flags the file gives, and the page lists no criterion the file doesn't or has retired; on fixtures, the parser reads a criterion line with a trailing comment and drops a retired one, and the comparison names a missing, an extra, a repeated and a mismatched row | Always; reads raw.githubusercontent.com | | `tests/Test-TemplateUpdate.ps1`: `.template/Get-TemplateUpdate.ps1`, on a fixture template repository whose tags carry a fixture changelog and a stand-in for `gh`, says nothing and opens nothing when the project is current, also on a version between tags; one version behind, creates the missing label and opens one issue titled with the newest version, labeled `template-update`, with that version's section and nothing from `[Unreleased]`, the project's own version or the link definitions; changes nothing on a second run; three versions behind, edits and retitles that same issue, with the three sections newest first; closes it with a comment once the project is current; ignores tags that aren't versions; keeps a section that, with its two closing line breaks, brings the body to exactly 60,000 characters, and leaves out one a character longer; closes the notice for a project ahead of the newest tag; and fails on a template it can't read, or when a `gh` call fails, without reporting a change | Always | | `tests/Test-GitHooks.ps1`: `.githooks/pre-push` refuses a push to `main` only while the Landing section says `protect: hook`, and lets a branch and a tag through; `Update-Project.ps1` and `Adopt-Project.ps1` enable `.githooks` only in a clone without hooks of its own, where a `.sample` hook doesn't count, print nothing when `core.hooksPath` already names `.githooks`, print the command to run for another hooks path, print how to run both for other hooks in `.git/hooks` and nothing for pre-commit's hooks; under `protect: hook` they print the pre-push wrapper to add (or the call to add to a clone's own pre-push hook) until something runs it, and the wrapper as `pre-push.legacy` refuses a push to `main` under pre-commit; `Get-PlanState.ps1`'s `protected` line is `hook` under `protect: hook` with `core.hooksPath` on `.githooks` or the wrapper in `pre-push` or `pre-push.legacy`, and not with only pre-commit's pre-push hook or under `protect: none`; `Update-Project.ps1`'s note on the removed Commit attribution check names the required check and any file that still calls `.githooks/commit-msg` | Always | -| `tests/Test-RepositoryBaseline.ps1`: `tools/Set-RepositoryBaseline.ps1`, on a stand-in for `gh` that records the calls of a `-WhatIf` run too, with `-WhatIf` changes nothing; gives a repository with no ruleset a "Protect main" ruleset on its default branch with no deletion, no force push, a pull request with no approvals and merge-commit and rebase merges only, no bypass, and delete-branch-on-merge; adds the required checks `-RequireChecks` names, passed as one comma-separated string; with `-RequireChecks auto`, requires the GitHub Actions checks that passed on the latest merged pull request, found on any page of closed pull requests, reading every page of its check runs and workflow runs, leaves out `Code review`, CodeQL and its Analyze jobs, push-only jobs, jobs no workflow run accounts for, other apps' checks and skipped, neutral, failed or unfinished ones, lists them and a command that names them, quoted so it parses, curly quotes too, with `-WhatIf`, says in every run that they come from one pull request, gives each repository its own checks with `-All`, and skips a repository with no merged pull request or no check to require; leaves alone the ruleset of a repository whose default branch already requires pull requests or that already has the ruleset, except that it turns on that ruleset's conversation resolution where it is off, sending only its rules, also with -WhatIf and a reported refusal, and updates the ruleset it made when `-RequireChecks` is given; requires every conversation resolved and the required checks to pass on an up-to-date branch; adds the CodeQL code-scanning rule (warnings and above, security alerts of any severity) and the extended query suite where CodeQL's default setup is configured and analyzes a language, which the summary names, even one that names no suite, and reports the repository as failed, with nothing else changed, when the switch is refused; keeps the rule on an update and leaves it out elsewhere, saying why and switching no suite where the setup is configured with no language, word for word as NCodeGroup/docs and NCodeGroup/brand answered on 2026-11-16, or its answer lists none, also with `-WhatIf`; leaves a ruleset's own code-scanning rule and thresholds as they are and never switches that repository's suite, printing a notice with the command to switch it by hand where the default setup runs another suite, also with `-WhatIf`, or, where the setup is configured but analyzes no language and the rule requires CodeQL, a warning that every pull request stays blocked, naming both fixes, also with `-RequireChecks`, with `-WhatIf` and beside a ruleset of the owner's, and no warning for a rule that requires another tool alone or a setup that isn't configured, and reporting a setup it can't read without failing the run, also beside a ruleset of the owner's; gives every repository it doesn't skip, one whose branch ruleset it leaves alone too, a "Protect release tags" ruleset on `v*` tags with no deletion, no update and no bypass, which `-WhatIf` shows, unless it has one of that name, whatever its state, or an active tag ruleset that refuses both already; turns on the read-only workflow token with Actions not approving pull requests, or approving and creating them where the default branch has `.github/workflows/raise-baseline.yml`, secret scanning, its push protection, Dependabot alerts, Dependabot security updates and private vulnerability reporting, in that order, each with the call and body the API takes and only where it is off, reports each as set, already set, would set or not available, leaves secret scanning out of a repository that isn't public, and reports a setting the API won't read or refuses without failing the run; allows auto-merge, with a PATCH that changes nothing else, only where it is off, on a repository whose branch ruleset it leaves alone too, and reports an answer without the setting, as GitHub gives someone who can't change it, or a refusal without failing the run; gives a public repository with either code-review workflow, last, an active Actions event policy for those two files alone that allows `pull_request_target`, `issue_comment` and every other event their top-level `on:` keys name, read from the files' base64 content in each form `on:` takes, which `-WhatIf` shows, unless it isn't public, has neither file, or has an active policy, its own or its organization's, that allows each of those events already; updates a policy of that name in place, with a PUT that keeps its other events, when it isn't active, misses an event or doesn't cover both files, and says why, also with `-WhatIf` and a reported refusal, and leaves one that does its job alone; reads a policy by its id when the list leaves its rules out; and reports a file or policy it can't read, or a refusal, without failing the run, and an organization read that fails other than with HTTP 403 or 404 in the policy's line; with `-OrganizationPolicy`, posts the same policy, on every repository, to the organization alone, prints it with `-WhatIf`, updates one of that name in place, keeping its other events, when it isn't active, misses an event or doesn't cover both files on every repository, says why, also with `-WhatIf` and when refused, leaves alone one that does or one that already allows both events on every repository, and exits 1 when it can't read the policies or is refused, saying for a refusal that asks to upgrade the organization's plan that it needs GitHub Team or above and to run it per repository, and otherwise naming the `admin:org` scope; skips archived repositories and forks with `-All`; and rejects missing and conflicting parameters; turns on immutable releases, except in a repository with `release-provenance.yml` or a workflow that runs on a `release` event or uploads release assets, read from a listing of `.github/workflows`, or one it can't read, or with `-SkipImmutableReleases`, which it reports, and turns them on where only a job is named `release`, and prints a notice with the command that turns them off where they are already on and a workflow runs on a `release` event or uploads release assets | Always | +| `tests/Test-RepositoryBaseline.ps1`: `tools/Set-RepositoryBaseline.ps1`, on a stand-in for `gh` that records the calls of a `-WhatIf` run too, with `-WhatIf` changes nothing; gives a repository with no ruleset a "Protect main" ruleset on its default branch with no deletion, no force push, a pull request with no approvals and merge-commit and rebase merges only, no bypass, and delete-branch-on-merge; adds the required checks `-RequireChecks` names, passed as one comma-separated string; with `-RequireChecks auto`, requires the GitHub Actions checks that passed on the latest merged pull request, found on any page of closed pull requests, reading every page of its check runs and workflow runs, leaves out `Code review`, CodeQL and its Analyze jobs, push-only jobs, jobs no workflow run accounts for, other apps' checks and skipped, neutral, failed or unfinished ones, lists them and a command that names them, quoted so it parses, curly quotes too, with `-WhatIf`, says in every run that they come from one pull request, gives each repository its own checks with `-All`, and skips a repository with no merged pull request or no check to require; leaves alone the ruleset of a repository whose default branch already requires pull requests or that already has the ruleset, except that it turns on that ruleset's conversation resolution where it is off, sending only its rules, also with -WhatIf and a reported refusal, and updates the ruleset it made when `-RequireChecks` is given; requires every conversation resolved and the required checks to pass on an up-to-date branch; adds the CodeQL code-scanning rule (warnings and above, security alerts of any severity) and the extended query suite where CodeQL's default setup is configured and analyzes a language, which the summary names, even one that names no suite, and reports the repository as failed, with nothing else changed, when the switch is refused; keeps the rule on an update and leaves it out elsewhere, saying why and switching no suite where the setup is configured with no language, word for word as NCodeGroup/docs and NCodeGroup/brand answered on 2026-11-16, or its answer lists none, also with `-WhatIf`; leaves a ruleset's own code-scanning rule and thresholds as they are and never switches that repository's suite, printing a notice with the command to switch it by hand where the default setup runs another suite, also with `-WhatIf`, or, where the setup is configured but analyzes no language and the rule requires CodeQL, a warning that every pull request stays blocked, naming both fixes, also with `-RequireChecks`, with `-WhatIf` and beside a ruleset of the owner's, and no warning for a rule that requires another tool alone or a setup that isn't configured, and reporting a setup it can't read without failing the run, also beside a ruleset of the owner's; gives every repository it doesn't skip, one whose branch ruleset it leaves alone too, a "Protect release tags" ruleset on `v*` tags with no deletion, no update and no bypass, which `-WhatIf` shows, unless it has one of that name, whatever its state, or an active tag ruleset that refuses both already; turns on the read-only workflow token with Actions not approving pull requests, `.github/workflows/raise-baseline.yml` or not, secret scanning, its push protection, Dependabot alerts, Dependabot security updates and private vulnerability reporting, in that order, each with the call and body the API takes and only where it is off, reports each as set, already set, would set or not available, leaves secret scanning out of a repository that isn't public, and reports a setting the API won't read or refuses without failing the run; allows auto-merge, with a PATCH that changes nothing else, only where it is off, on a repository whose branch ruleset it leaves alone too, and reports an answer without the setting, as GitHub gives someone who can't change it, or a refusal without failing the run; gives a public repository with either code-review workflow, last, an active Actions event policy for those two files alone that allows `pull_request_target`, `issue_comment` and every other event their top-level `on:` keys name, read from the files' base64 content in each form `on:` takes, which `-WhatIf` shows, unless it isn't public, has neither file, or has an active policy, its own or its organization's, that allows each of those events already; updates a policy of that name in place, with a PUT that keeps its other events, when it isn't active, misses an event or doesn't cover both files, and says why, also with `-WhatIf` and a reported refusal, and leaves one that does its job alone; reads a policy by its id when the list leaves its rules out; and reports a file or policy it can't read, or a refusal, without failing the run, and an organization read that fails other than with HTTP 403 or 404 in the policy's line; with `-OrganizationPolicy`, posts the same policy, on every repository, to the organization alone, prints it with `-WhatIf`, updates one of that name in place, keeping its other events, when it isn't active, misses an event or doesn't cover both files on every repository, says why, also with `-WhatIf` and when refused, leaves alone one that does or one that already allows both events on every repository, sets the organization's default workflow token to read-only with Actions not approving pull requests, and exits 1 when it can't read the policies or is refused, or that setting fails, saying for a refusal that asks to upgrade the organization's plan that it needs GitHub Team or above and to run it per repository, and otherwise naming the `admin:org` scope; skips archived repositories and forks with `-All`; and rejects missing and conflicting parameters; turns on immutable releases, except in a repository with `release-provenance.yml` or a workflow that runs on a `release` event or uploads release assets, read from a listing of `.github/workflows`, or one it can't read, or with `-SkipImmutableReleases`, which it reports, and turns them on where only a job is named `release`, and prints a notice with the command that turns them off where they are already on and a workflow runs on a `release` event or uploads release assets | Always | | `tests/Test-GitLabBaseline.ps1`: `tools/Set-GitLabBaseline.ps1`, on a stand-in for `glab` that records its calls, with `-WhatIf` changes nothing; turns on "All threads must be resolved" and then "Pipelines must succeed", each with its own PUT of the project and only where it is off; reports each as set, already set, would set or not available, also a field the answer leaves out and a refusal, without failing the run; fails on a project it can't read and skips an archived one; sets `squash_option` to `never` with its own PUT where it is another value; for the default branch's push access, leaves a protection where no one can push, protects an unprotected branch with no one allowed to push and Maintainers allowed to merge, removes a protection made of roles and protects the branch again with no one allowed to push and its merge, unprotect and force-push settings, reports a protection that names a user, one it can't read and a refused removal without changing anything, restores the earlier protection after a refused one, fails the run when that fails too, shows its change with `-WhatIf` without making it, and reads no protection for a project without a default branch; reads the project and host from a clone's HTTPS or SSH `origin`, in the current folder or `-Path`, URL-encodes a subgroup's path and takes `-Hostname`; and rejects `-Project` with `-Path` and a clone with no `origin`; schedules the weekly pipeline once, on the default branch | Always | | `tests/Test-NewProjectRemote.ps1`: `New-Project.ps1 -CreateRemote`, run from a copy beside stand-ins for `tools/Set-RepositoryBaseline.ps1` and `tools/Set-GitLabBaseline.ps1` that record their arguments, with stand-ins for `copier`, `gh` and `glab` on `PATH`, runs `Set-RepositoryBaseline.ps1 -Repo -Owner -RequireChecks 'build-and-test'` after `gh repo create`, with the signed-in user or `-Owner`, and `Set-GitLabBaseline.ps1 -Path ` after `glab repo create`, with `-Owner` as the group, and the push; skips either with `-NoBaseline`; succeeds when a baseline fails, or `gh` can't read the signed-in user, naming `` to fill in, with a warning that gives the command to run it again; and the real baseline scripts take the parameters it passes | Always | | `tests/Test-ScriptAnalyzer.ps1`: every `.ps1`, `.psm1` and `.psd1` file in the repository outside `.claude/worktrees/`, the scripts the template ships included, has no PSScriptAnalyzer warning or error under `PSScriptAnalyzerSettings.psd1`; a finding that can't be fixed is suppressed where it is, with a justification; and a control file with a known warning must be reported, and the same file under `.claude/worktrees/` must not, so a pass proves something | Always | diff --git a/copier.yml b/copier.yml index 9e358773..82bb6975 100644 --- a/copier.yml +++ b/copier.yml @@ -196,6 +196,7 @@ _exclude: docs/decisions/project-template/0028-github-releases-are-immutable-and-their-tags-signed.md docs/decisions/project-template/0034-with-one-writer-the-baseline-requires-no-approval.md docs/decisions/project-template/0035-a-sole-maintainer-dismisses-the-scorecard-alerts-one-person-cannot-clear.md + docs/decisions/project-template/0036-a-required-approval-is-met-by-ncode-reviews-approver-app.md {% endif %} - |- {% if git_host is defined and not (git_host == 'github' and (workflow_tools is not defined or 'copilot' in workflow_tools)) %} diff --git a/template/.claude/commands/handoff-plan.md b/template/.claude/commands/handoff-plan.md index 050fcd15..c71c934e 100644 --- a/template/.claude/commands/handoff-plan.md +++ b/template/.claude/commands/handoff-plan.md @@ -117,7 +117,7 @@ The plan's last step writes the plan's entries, for every plan: When the repository has a `version.json` at its root, which Nerdbank.GitVersioning builds each package's version from, and the plan has a `Release:` line, the same last step also sets that file's `version` to the `Release:` version without its leading `v`, such as `"1.4.0"` for `v1.4.0`, changing nothing else, and lists `version.json` on its Files line: a release tag whose commit holds another version publishes no package. When that version starts a new major version and the file's `assemblyVersion` names a `version`, the step also sets `assemblyVersion` to `{ "precision": "major" }`. The state script prints `version-file: match` when the file holds the plan's version, `mismatch ` when it holds another, and `-` without the file or a `Release:` line. -When the repository has `.github/workflows/raise-baseline.yml`, that workflow opens the pull request that raises `PackageValidationBaselineVersion` once nuget.org lists a release: a plan never raises the baseline in a step or lists raising it under `## Follow-ups`. +When the repository has `.github/workflows/raise-baseline.yml`, that workflow pushes the branch that raises `PackageValidationBaselineVersion` once nuget.org lists a release and opens an issue whose link opens its pull request: a plan never raises the baseline in a step or lists raising it under `## Follow-ups`. Write the step so the executor copies text: it gives the heading, each entry under its group, and each link line in full. In a pre-release project, it gives each entry to add in full, and each entry to rewrite or delete by its first words and, for a rewrite, its new text in full. Only `` is left to the executor, with the `Get-Date` command. Never reformat a changelog in another format, or an older section of any changelog, unless the request asks for it, as an adopted project's follow-up does; a heading that `changelog-duplicates` names in an older release section stays as it is. A plan that converts a changelog keeps every entry's text. It dates each version's heading with its tag's date (`git log -1 --format=%as `), puts each entry in one group, and adds the preamble, `## [Unreleased]` and the link reference definitions. diff --git a/template/.claude/commands/plan-bugfix.md b/template/.claude/commands/plan-bugfix.md index baee2a3c..75243752 100644 --- a/template/.claude/commands/plan-bugfix.md +++ b/template/.claude/commands/plan-bugfix.md @@ -119,7 +119,7 @@ The plan's last step writes the plan's entries, for every plan: When the repository has a `version.json` at its root, which Nerdbank.GitVersioning builds each package's version from, and the plan has a `Release:` line, the same last step also sets that file's `version` to the `Release:` version without its leading `v`, such as `"1.4.0"` for `v1.4.0`, changing nothing else, and lists `version.json` on its Files line: a release tag whose commit holds another version publishes no package. When that version starts a new major version and the file's `assemblyVersion` names a `version`, the step also sets `assemblyVersion` to `{ "precision": "major" }`. The state script prints `version-file: match` when the file holds the plan's version, `mismatch ` when it holds another, and `-` without the file or a `Release:` line. -When the repository has `.github/workflows/raise-baseline.yml`, that workflow opens the pull request that raises `PackageValidationBaselineVersion` once nuget.org lists a release: a plan never raises the baseline in a step or lists raising it under `## Follow-ups`. +When the repository has `.github/workflows/raise-baseline.yml`, that workflow pushes the branch that raises `PackageValidationBaselineVersion` once nuget.org lists a release and opens an issue whose link opens its pull request: a plan never raises the baseline in a step or lists raising it under `## Follow-ups`. Write the step so the executor copies text: it gives the heading, each entry under its group, and each link line in full. In a pre-release project, it gives each entry to add in full, and each entry to rewrite or delete by its first words and, for a rewrite, its new text in full. Only `` is left to the executor, with the `Get-Date` command. Never reformat a changelog in another format, or an older section of any changelog, unless the request asks for it, as an adopted project's follow-up does; a heading that `changelog-duplicates` names in an older release section stays as it is. A plan that converts a changelog keeps every entry's text. It dates each version's heading with its tag's date (`git log -1 --format=%as `), puts each entry in one group, and adds the preamble, `## [Unreleased]` and the link reference definitions. diff --git a/template/.claude/commands/plan-docs.md b/template/.claude/commands/plan-docs.md index d62f960d..93e3af2e 100644 --- a/template/.claude/commands/plan-docs.md +++ b/template/.claude/commands/plan-docs.md @@ -117,7 +117,7 @@ The plan's last step writes the plan's entries, for every plan: When the repository has a `version.json` at its root, which Nerdbank.GitVersioning builds each package's version from, and the plan has a `Release:` line, the same last step also sets that file's `version` to the `Release:` version without its leading `v`, such as `"1.4.0"` for `v1.4.0`, changing nothing else, and lists `version.json` on its Files line: a release tag whose commit holds another version publishes no package. When that version starts a new major version and the file's `assemblyVersion` names a `version`, the step also sets `assemblyVersion` to `{ "precision": "major" }`. The state script prints `version-file: match` when the file holds the plan's version, `mismatch ` when it holds another, and `-` without the file or a `Release:` line. -When the repository has `.github/workflows/raise-baseline.yml`, that workflow opens the pull request that raises `PackageValidationBaselineVersion` once nuget.org lists a release: a plan never raises the baseline in a step or lists raising it under `## Follow-ups`. +When the repository has `.github/workflows/raise-baseline.yml`, that workflow pushes the branch that raises `PackageValidationBaselineVersion` once nuget.org lists a release and opens an issue whose link opens its pull request: a plan never raises the baseline in a step or lists raising it under `## Follow-ups`. Write the step so the executor copies text: it gives the heading, each entry under its group, and each link line in full. In a pre-release project, it gives each entry to add in full, and each entry to rewrite or delete by its first words and, for a rewrite, its new text in full. Only `` is left to the executor, with the `Get-Date` command. Never reformat a changelog in another format, or an older section of any changelog, unless the request asks for it, as an adopted project's follow-up does; a heading that `changelog-duplicates` names in an older release section stays as it is. A plan that converts a changelog keeps every entry's text. It dates each version's heading with its tag's date (`git log -1 --format=%as `), puts each entry in one group, and adds the preamble, `## [Unreleased]` and the link reference definitions. diff --git a/template/.claude/commands/plan-feature.md b/template/.claude/commands/plan-feature.md index 4a5dbcf6..a7d4dd45 100644 --- a/template/.claude/commands/plan-feature.md +++ b/template/.claude/commands/plan-feature.md @@ -119,7 +119,7 @@ The plan's last step writes the plan's entries, for every plan: When the repository has a `version.json` at its root, which Nerdbank.GitVersioning builds each package's version from, and the plan has a `Release:` line, the same last step also sets that file's `version` to the `Release:` version without its leading `v`, such as `"1.4.0"` for `v1.4.0`, changing nothing else, and lists `version.json` on its Files line: a release tag whose commit holds another version publishes no package. When that version starts a new major version and the file's `assemblyVersion` names a `version`, the step also sets `assemblyVersion` to `{ "precision": "major" }`. The state script prints `version-file: match` when the file holds the plan's version, `mismatch ` when it holds another, and `-` without the file or a `Release:` line. -When the repository has `.github/workflows/raise-baseline.yml`, that workflow opens the pull request that raises `PackageValidationBaselineVersion` once nuget.org lists a release: a plan never raises the baseline in a step or lists raising it under `## Follow-ups`. +When the repository has `.github/workflows/raise-baseline.yml`, that workflow pushes the branch that raises `PackageValidationBaselineVersion` once nuget.org lists a release and opens an issue whose link opens its pull request: a plan never raises the baseline in a step or lists raising it under `## Follow-ups`. Write the step so the executor copies text: it gives the heading, each entry under its group, and each link line in full. In a pre-release project, it gives each entry to add in full, and each entry to rewrite or delete by its first words and, for a rewrite, its new text in full. Only `` is left to the executor, with the `Get-Date` command. Never reformat a changelog in another format, or an older section of any changelog, unless the request asks for it, as an adopted project's follow-up does; a heading that `changelog-duplicates` names in an older release section stays as it is. A plan that converts a changelog keeps every entry's text. It dates each version's heading with its tag's date (`git log -1 --format=%as `), puts each entry in one group, and adds the preamble, `## [Unreleased]` and the link reference definitions. diff --git a/template/.claude/commands/plan-issue.md b/template/.claude/commands/plan-issue.md index ce648f38..0906bb00 100644 --- a/template/.claude/commands/plan-issue.md +++ b/template/.claude/commands/plan-issue.md @@ -292,7 +292,7 @@ The plan's last step writes the plan's entries, for every plan: When the repository has a `version.json` at its root, which Nerdbank.GitVersioning builds each package's version from, and the plan has a `Release:` line, the same last step also sets that file's `version` to the `Release:` version without its leading `v`, such as `"1.4.0"` for `v1.4.0`, changing nothing else, and lists `version.json` on its Files line: a release tag whose commit holds another version publishes no package. When that version starts a new major version and the file's `assemblyVersion` names a `version`, the step also sets `assemblyVersion` to `{ "precision": "major" }`. The state script prints `version-file: match` when the file holds the plan's version, `mismatch ` when it holds another, and `-` without the file or a `Release:` line. -When the repository has `.github/workflows/raise-baseline.yml`, that workflow opens the pull request that raises `PackageValidationBaselineVersion` once nuget.org lists a release: a plan never raises the baseline in a step or lists raising it under `## Follow-ups`. +When the repository has `.github/workflows/raise-baseline.yml`, that workflow pushes the branch that raises `PackageValidationBaselineVersion` once nuget.org lists a release and opens an issue whose link opens its pull request: a plan never raises the baseline in a step or lists raising it under `## Follow-ups`. Write the step so the executor copies text: it gives the heading, each entry under its group, and each link line in full. In a pre-release project, it gives each entry to add in full, and each entry to rewrite or delete by its first words and, for a rewrite, its new text in full. Only `` is left to the executor, with the `Get-Date` command. Never reformat a changelog in another format, or an older section of any changelog, unless the request asks for it, as an adopted project's follow-up does; a heading that `changelog-duplicates` names in an older release section stays as it is. A plan that converts a changelog keeps every entry's text. It dates each version's heading with its tag's date (`git log -1 --format=%as `), puts each entry in one group, and adds the preamble, `## [Unreleased]` and the link reference definitions. diff --git a/template/.claude/commands/plan-migration.md b/template/.claude/commands/plan-migration.md index 277b64ab..742939f3 100644 --- a/template/.claude/commands/plan-migration.md +++ b/template/.claude/commands/plan-migration.md @@ -117,7 +117,7 @@ The plan's last step writes the plan's entries, for every plan: When the repository has a `version.json` at its root, which Nerdbank.GitVersioning builds each package's version from, and the plan has a `Release:` line, the same last step also sets that file's `version` to the `Release:` version without its leading `v`, such as `"1.4.0"` for `v1.4.0`, changing nothing else, and lists `version.json` on its Files line: a release tag whose commit holds another version publishes no package. When that version starts a new major version and the file's `assemblyVersion` names a `version`, the step also sets `assemblyVersion` to `{ "precision": "major" }`. The state script prints `version-file: match` when the file holds the plan's version, `mismatch ` when it holds another, and `-` without the file or a `Release:` line. -When the repository has `.github/workflows/raise-baseline.yml`, that workflow opens the pull request that raises `PackageValidationBaselineVersion` once nuget.org lists a release: a plan never raises the baseline in a step or lists raising it under `## Follow-ups`. +When the repository has `.github/workflows/raise-baseline.yml`, that workflow pushes the branch that raises `PackageValidationBaselineVersion` once nuget.org lists a release and opens an issue whose link opens its pull request: a plan never raises the baseline in a step or lists raising it under `## Follow-ups`. Write the step so the executor copies text: it gives the heading, each entry under its group, and each link line in full. In a pre-release project, it gives each entry to add in full, and each entry to rewrite or delete by its first words and, for a rewrite, its new text in full. Only `` is left to the executor, with the `Get-Date` command. Never reformat a changelog in another format, or an older section of any changelog, unless the request asks for it, as an adopted project's follow-up does; a heading that `changelog-duplicates` names in an older release section stays as it is. A plan that converts a changelog keeps every entry's text. It dates each version's heading with its tag's date (`git log -1 --format=%as `), puts each entry in one group, and adds the preamble, `## [Unreleased]` and the link reference definitions. diff --git a/template/.claude/commands/plan-performance.md b/template/.claude/commands/plan-performance.md index f79d155f..1ed7f0a5 100644 --- a/template/.claude/commands/plan-performance.md +++ b/template/.claude/commands/plan-performance.md @@ -116,7 +116,7 @@ The plan's last step writes the plan's entries, for every plan: When the repository has a `version.json` at its root, which Nerdbank.GitVersioning builds each package's version from, and the plan has a `Release:` line, the same last step also sets that file's `version` to the `Release:` version without its leading `v`, such as `"1.4.0"` for `v1.4.0`, changing nothing else, and lists `version.json` on its Files line: a release tag whose commit holds another version publishes no package. When that version starts a new major version and the file's `assemblyVersion` names a `version`, the step also sets `assemblyVersion` to `{ "precision": "major" }`. The state script prints `version-file: match` when the file holds the plan's version, `mismatch ` when it holds another, and `-` without the file or a `Release:` line. -When the repository has `.github/workflows/raise-baseline.yml`, that workflow opens the pull request that raises `PackageValidationBaselineVersion` once nuget.org lists a release: a plan never raises the baseline in a step or lists raising it under `## Follow-ups`. +When the repository has `.github/workflows/raise-baseline.yml`, that workflow pushes the branch that raises `PackageValidationBaselineVersion` once nuget.org lists a release and opens an issue whose link opens its pull request: a plan never raises the baseline in a step or lists raising it under `## Follow-ups`. Write the step so the executor copies text: it gives the heading, each entry under its group, and each link line in full. In a pre-release project, it gives each entry to add in full, and each entry to rewrite or delete by its first words and, for a rewrite, its new text in full. Only `` is left to the executor, with the `Get-Date` command. Never reformat a changelog in another format, or an older section of any changelog, unless the request asks for it, as an adopted project's follow-up does; a heading that `changelog-duplicates` names in an older release section stays as it is. A plan that converts a changelog keeps every entry's text. It dates each version's heading with its tag's date (`git log -1 --format=%as `), puts each entry in one group, and adds the preamble, `## [Unreleased]` and the link reference definitions. diff --git a/template/.claude/commands/plan-refactor.md b/template/.claude/commands/plan-refactor.md index dfbc1932..83744e2a 100644 --- a/template/.claude/commands/plan-refactor.md +++ b/template/.claude/commands/plan-refactor.md @@ -118,7 +118,7 @@ The plan's last step writes the plan's entries, for every plan: When the repository has a `version.json` at its root, which Nerdbank.GitVersioning builds each package's version from, and the plan has a `Release:` line, the same last step also sets that file's `version` to the `Release:` version without its leading `v`, such as `"1.4.0"` for `v1.4.0`, changing nothing else, and lists `version.json` on its Files line: a release tag whose commit holds another version publishes no package. When that version starts a new major version and the file's `assemblyVersion` names a `version`, the step also sets `assemblyVersion` to `{ "precision": "major" }`. The state script prints `version-file: match` when the file holds the plan's version, `mismatch ` when it holds another, and `-` without the file or a `Release:` line. -When the repository has `.github/workflows/raise-baseline.yml`, that workflow opens the pull request that raises `PackageValidationBaselineVersion` once nuget.org lists a release: a plan never raises the baseline in a step or lists raising it under `## Follow-ups`. +When the repository has `.github/workflows/raise-baseline.yml`, that workflow pushes the branch that raises `PackageValidationBaselineVersion` once nuget.org lists a release and opens an issue whose link opens its pull request: a plan never raises the baseline in a step or lists raising it under `## Follow-ups`. Write the step so the executor copies text: it gives the heading, each entry under its group, and each link line in full. In a pre-release project, it gives each entry to add in full, and each entry to rewrite or delete by its first words and, for a rewrite, its new text in full. Only `` is left to the executor, with the `Get-Date` command. Never reformat a changelog in another format, or an older section of any changelog, unless the request asks for it, as an adopted project's follow-up does; a heading that `changelog-duplicates` names in an older release section stays as it is. A plan that converts a changelog keeps every entry's text. It dates each version's heading with its tag's date (`git log -1 --format=%as `), puts each entry in one group, and adds the preamble, `## [Unreleased]` and the link reference definitions. diff --git a/template/.claude/commands/plan-security.md b/template/.claude/commands/plan-security.md index 8838d748..d9821098 100644 --- a/template/.claude/commands/plan-security.md +++ b/template/.claude/commands/plan-security.md @@ -116,7 +116,7 @@ The plan's last step writes the plan's entries, for every plan: When the repository has a `version.json` at its root, which Nerdbank.GitVersioning builds each package's version from, and the plan has a `Release:` line, the same last step also sets that file's `version` to the `Release:` version without its leading `v`, such as `"1.4.0"` for `v1.4.0`, changing nothing else, and lists `version.json` on its Files line: a release tag whose commit holds another version publishes no package. When that version starts a new major version and the file's `assemblyVersion` names a `version`, the step also sets `assemblyVersion` to `{ "precision": "major" }`. The state script prints `version-file: match` when the file holds the plan's version, `mismatch ` when it holds another, and `-` without the file or a `Release:` line. -When the repository has `.github/workflows/raise-baseline.yml`, that workflow opens the pull request that raises `PackageValidationBaselineVersion` once nuget.org lists a release: a plan never raises the baseline in a step or lists raising it under `## Follow-ups`. +When the repository has `.github/workflows/raise-baseline.yml`, that workflow pushes the branch that raises `PackageValidationBaselineVersion` once nuget.org lists a release and opens an issue whose link opens its pull request: a plan never raises the baseline in a step or lists raising it under `## Follow-ups`. Write the step so the executor copies text: it gives the heading, each entry under its group, and each link line in full. In a pre-release project, it gives each entry to add in full, and each entry to rewrite or delete by its first words and, for a rewrite, its new text in full. Only `` is left to the executor, with the `Get-Date` command. Never reformat a changelog in another format, or an older section of any changelog, unless the request asks for it, as an adopted project's follow-up does; a heading that `changelog-duplicates` names in an older release section stays as it is. A plan that converts a changelog keeps every entry's text. It dates each version's heading with its tag's date (`git log -1 --format=%as `), puts each entry in one group, and adds the preamble, `## [Unreleased]` and the link reference definitions. diff --git a/template/.claude/commands/plan-template-update.md b/template/.claude/commands/plan-template-update.md index 7ca81ed5..dfda8184 100644 --- a/template/.claude/commands/plan-template-update.md +++ b/template/.claude/commands/plan-template-update.md @@ -131,7 +131,7 @@ The plan's last step writes the plan's entries, for every plan: When the repository has a `version.json` at its root, which Nerdbank.GitVersioning builds each package's version from, and the plan has a `Release:` line, the same last step also sets that file's `version` to the `Release:` version without its leading `v`, such as `"1.4.0"` for `v1.4.0`, changing nothing else, and lists `version.json` on its Files line: a release tag whose commit holds another version publishes no package. When that version starts a new major version and the file's `assemblyVersion` names a `version`, the step also sets `assemblyVersion` to `{ "precision": "major" }`. The state script prints `version-file: match` when the file holds the plan's version, `mismatch ` when it holds another, and `-` without the file or a `Release:` line. -When the repository has `.github/workflows/raise-baseline.yml`, that workflow opens the pull request that raises `PackageValidationBaselineVersion` once nuget.org lists a release: a plan never raises the baseline in a step or lists raising it under `## Follow-ups`. +When the repository has `.github/workflows/raise-baseline.yml`, that workflow pushes the branch that raises `PackageValidationBaselineVersion` once nuget.org lists a release and opens an issue whose link opens its pull request: a plan never raises the baseline in a step or lists raising it under `## Follow-ups`. Write the step so the executor copies text: it gives the heading, each entry under its group, and each link line in full. In a pre-release project, it gives each entry to add in full, and each entry to rewrite or delete by its first words and, for a rewrite, its new text in full. Only `` is left to the executor, with the `Get-Date` command. Never reformat a changelog in another format, or an older section of any changelog, unless the request asks for it, as an adopted project's follow-up does; a heading that `changelog-duplicates` names in an older release section stays as it is. A plan that converts a changelog keeps every entry's text. It dates each version's heading with its tag's date (`git log -1 --format=%as `), puts each entry in one group, and adds the preamble, `## [Unreleased]` and the link reference definitions. diff --git a/template/.claude/commands/plan-tests.md b/template/.claude/commands/plan-tests.md index 293475e8..2b53a314 100644 --- a/template/.claude/commands/plan-tests.md +++ b/template/.claude/commands/plan-tests.md @@ -117,7 +117,7 @@ The plan's last step writes the plan's entries, for every plan: When the repository has a `version.json` at its root, which Nerdbank.GitVersioning builds each package's version from, and the plan has a `Release:` line, the same last step also sets that file's `version` to the `Release:` version without its leading `v`, such as `"1.4.0"` for `v1.4.0`, changing nothing else, and lists `version.json` on its Files line: a release tag whose commit holds another version publishes no package. When that version starts a new major version and the file's `assemblyVersion` names a `version`, the step also sets `assemblyVersion` to `{ "precision": "major" }`. The state script prints `version-file: match` when the file holds the plan's version, `mismatch ` when it holds another, and `-` without the file or a `Release:` line. -When the repository has `.github/workflows/raise-baseline.yml`, that workflow opens the pull request that raises `PackageValidationBaselineVersion` once nuget.org lists a release: a plan never raises the baseline in a step or lists raising it under `## Follow-ups`. +When the repository has `.github/workflows/raise-baseline.yml`, that workflow pushes the branch that raises `PackageValidationBaselineVersion` once nuget.org lists a release and opens an issue whose link opens its pull request: a plan never raises the baseline in a step or lists raising it under `## Follow-ups`. Write the step so the executor copies text: it gives the heading, each entry under its group, and each link line in full. In a pre-release project, it gives each entry to add in full, and each entry to rewrite or delete by its first words and, for a rewrite, its new text in full. Only `` is left to the executor, with the `Get-Date` command. Never reformat a changelog in another format, or an older section of any changelog, unless the request asks for it, as an adopted project's follow-up does; a heading that `changelog-duplicates` names in an older release section stays as it is. A plan that converts a changelog keeps every entry's text. It dates each version's heading with its tag's date (`git log -1 --format=%as `), puts each entry in one group, and adds the preamble, `## [Unreleased]` and the link reference definitions. diff --git a/template/.claude/commands/ship-plan.md b/template/.claude/commands/ship-plan.md index 564da75b..79e0845f 100644 --- a/template/.claude/commands/ship-plan.md +++ b/template/.claude/commands/ship-plan.md @@ -111,7 +111,7 @@ The plan's last step writes the plan's entries, for every plan: When the repository has a `version.json` at its root, which Nerdbank.GitVersioning builds each package's version from, and the plan has a `Release:` line, the same last step also sets that file's `version` to the `Release:` version without its leading `v`, such as `"1.4.0"` for `v1.4.0`, changing nothing else, and lists `version.json` on its Files line: a release tag whose commit holds another version publishes no package. When that version starts a new major version and the file's `assemblyVersion` names a `version`, the step also sets `assemblyVersion` to `{ "precision": "major" }`. The state script prints `version-file: match` when the file holds the plan's version, `mismatch ` when it holds another, and `-` without the file or a `Release:` line. -When the repository has `.github/workflows/raise-baseline.yml`, that workflow opens the pull request that raises `PackageValidationBaselineVersion` once nuget.org lists a release: a plan never raises the baseline in a step or lists raising it under `## Follow-ups`. +When the repository has `.github/workflows/raise-baseline.yml`, that workflow pushes the branch that raises `PackageValidationBaselineVersion` once nuget.org lists a release and opens an issue whose link opens its pull request: a plan never raises the baseline in a step or lists raising it under `## Follow-ups`. Write the step so the executor copies text: it gives the heading, each entry under its group, and each link line in full. In a pre-release project, it gives each entry to add in full, and each entry to rewrite or delete by its first words and, for a rewrite, its new text in full. Only `` is left to the executor, with the `Get-Date` command. Never reformat a changelog in another format, or an older section of any changelog, unless the request asks for it, as an adopted project's follow-up does; a heading that `changelog-duplicates` names in an older release section stays as it is. A plan that converts a changelog keeps every entry's text. It dates each version's heading with its tag's date (`git log -1 --format=%as `), puts each entry in one group, and adds the preamble, `## [Unreleased]` and the link reference definitions. diff --git a/template/.github/agents/copilot-planner.agent.md b/template/.github/agents/copilot-planner.agent.md index c3007235..652af4a5 100644 --- a/template/.github/agents/copilot-planner.agent.md +++ b/template/.github/agents/copilot-planner.agent.md @@ -180,7 +180,7 @@ The plan's last step writes the plan's entries, for every plan: When the repository has a `version.json` at its root, which Nerdbank.GitVersioning builds each package's version from, and the plan has a `Release:` line, the same last step also sets that file's `version` to the `Release:` version without its leading `v`, such as `"1.4.0"` for `v1.4.0`, changing nothing else, and lists `version.json` on its Files line: a release tag whose commit holds another version publishes no package. When that version starts a new major version and the file's `assemblyVersion` names a `version`, the step also sets `assemblyVersion` to `{ "precision": "major" }`. The state script prints `version-file: match` when the file holds the plan's version, `mismatch ` when it holds another, and `-` without the file or a `Release:` line. -When the repository has `.github/workflows/raise-baseline.yml`, that workflow opens the pull request that raises `PackageValidationBaselineVersion` once nuget.org lists a release: a plan never raises the baseline in a step or lists raising it under `## Follow-ups`. +When the repository has `.github/workflows/raise-baseline.yml`, that workflow pushes the branch that raises `PackageValidationBaselineVersion` once nuget.org lists a release and opens an issue whose link opens its pull request: a plan never raises the baseline in a step or lists raising it under `## Follow-ups`. Write the step so the executor copies text: it gives the heading, each entry under its group, and each link line in full. In a pre-release project, it gives each entry to add in full, and each entry to rewrite or delete by its first words and, for a rewrite, its new text in full. Only `` is left to the executor, with the `Get-Date` command. Never reformat a changelog in another format, or an older section of any changelog, unless the request asks for it, as an adopted project's follow-up does; a heading that `changelog-duplicates` names in an older release section stays as it is. A plan that converts a changelog keeps every entry's text. It dates each version's heading with its tag's date (`git log -1 --format=%as `), puts each entry in one group, and adds the preamble, `## [Unreleased]` and the link reference definitions. diff --git a/template/.github/agents/hybrid-planner.agent.md b/template/.github/agents/hybrid-planner.agent.md index a8b7507c..c0e6d39e 100644 --- a/template/.github/agents/hybrid-planner.agent.md +++ b/template/.github/agents/hybrid-planner.agent.md @@ -180,7 +180,7 @@ The plan's last step writes the plan's entries, for every plan: When the repository has a `version.json` at its root, which Nerdbank.GitVersioning builds each package's version from, and the plan has a `Release:` line, the same last step also sets that file's `version` to the `Release:` version without its leading `v`, such as `"1.4.0"` for `v1.4.0`, changing nothing else, and lists `version.json` on its Files line: a release tag whose commit holds another version publishes no package. When that version starts a new major version and the file's `assemblyVersion` names a `version`, the step also sets `assemblyVersion` to `{ "precision": "major" }`. The state script prints `version-file: match` when the file holds the plan's version, `mismatch ` when it holds another, and `-` without the file or a `Release:` line. -When the repository has `.github/workflows/raise-baseline.yml`, that workflow opens the pull request that raises `PackageValidationBaselineVersion` once nuget.org lists a release: a plan never raises the baseline in a step or lists raising it under `## Follow-ups`. +When the repository has `.github/workflows/raise-baseline.yml`, that workflow pushes the branch that raises `PackageValidationBaselineVersion` once nuget.org lists a release and opens an issue whose link opens its pull request: a plan never raises the baseline in a step or lists raising it under `## Follow-ups`. Write the step so the executor copies text: it gives the heading, each entry under its group, and each link line in full. In a pre-release project, it gives each entry to add in full, and each entry to rewrite or delete by its first words and, for a rewrite, its new text in full. Only `` is left to the executor, with the `Get-Date` command. Never reformat a changelog in another format, or an older section of any changelog, unless the request asks for it, as an adopted project's follow-up does; a heading that `changelog-duplicates` names in an older release section stays as it is. A plan that converts a changelog keeps every entry's text. It dates each version's heading with its tag's date (`git log -1 --format=%as `), puts each entry in one group, and adds the preamble, `## [Unreleased]` and the link reference definitions. diff --git a/template/.github/prompts/handoff-plan.prompt.md b/template/.github/prompts/handoff-plan.prompt.md index ea3891ae..b1d9ddda 100644 --- a/template/.github/prompts/handoff-plan.prompt.md +++ b/template/.github/prompts/handoff-plan.prompt.md @@ -123,7 +123,7 @@ The plan's last step writes the plan's entries, for every plan: When the repository has a `version.json` at its root, which Nerdbank.GitVersioning builds each package's version from, and the plan has a `Release:` line, the same last step also sets that file's `version` to the `Release:` version without its leading `v`, such as `"1.4.0"` for `v1.4.0`, changing nothing else, and lists `version.json` on its Files line: a release tag whose commit holds another version publishes no package. When that version starts a new major version and the file's `assemblyVersion` names a `version`, the step also sets `assemblyVersion` to `{ "precision": "major" }`. The state script prints `version-file: match` when the file holds the plan's version, `mismatch ` when it holds another, and `-` without the file or a `Release:` line. -When the repository has `.github/workflows/raise-baseline.yml`, that workflow opens the pull request that raises `PackageValidationBaselineVersion` once nuget.org lists a release: a plan never raises the baseline in a step or lists raising it under `## Follow-ups`. +When the repository has `.github/workflows/raise-baseline.yml`, that workflow pushes the branch that raises `PackageValidationBaselineVersion` once nuget.org lists a release and opens an issue whose link opens its pull request: a plan never raises the baseline in a step or lists raising it under `## Follow-ups`. Write the step so the executor copies text: it gives the heading, each entry under its group, and each link line in full. In a pre-release project, it gives each entry to add in full, and each entry to rewrite or delete by its first words and, for a rewrite, its new text in full. Only `` is left to the executor, with the `Get-Date` command. Never reformat a changelog in another format, or an older section of any changelog, unless the request asks for it, as an adopted project's follow-up does; a heading that `changelog-duplicates` names in an older release section stays as it is. A plan that converts a changelog keeps every entry's text. It dates each version's heading with its tag's date (`git log -1 --format=%as `), puts each entry in one group, and adds the preamble, `## [Unreleased]` and the link reference definitions. diff --git a/template/.github/prompts/plan-bugfix.prompt.md b/template/.github/prompts/plan-bugfix.prompt.md index 3c63c03a..e12d0acb 100644 --- a/template/.github/prompts/plan-bugfix.prompt.md +++ b/template/.github/prompts/plan-bugfix.prompt.md @@ -125,7 +125,7 @@ The plan's last step writes the plan's entries, for every plan: When the repository has a `version.json` at its root, which Nerdbank.GitVersioning builds each package's version from, and the plan has a `Release:` line, the same last step also sets that file's `version` to the `Release:` version without its leading `v`, such as `"1.4.0"` for `v1.4.0`, changing nothing else, and lists `version.json` on its Files line: a release tag whose commit holds another version publishes no package. When that version starts a new major version and the file's `assemblyVersion` names a `version`, the step also sets `assemblyVersion` to `{ "precision": "major" }`. The state script prints `version-file: match` when the file holds the plan's version, `mismatch ` when it holds another, and `-` without the file or a `Release:` line. -When the repository has `.github/workflows/raise-baseline.yml`, that workflow opens the pull request that raises `PackageValidationBaselineVersion` once nuget.org lists a release: a plan never raises the baseline in a step or lists raising it under `## Follow-ups`. +When the repository has `.github/workflows/raise-baseline.yml`, that workflow pushes the branch that raises `PackageValidationBaselineVersion` once nuget.org lists a release and opens an issue whose link opens its pull request: a plan never raises the baseline in a step or lists raising it under `## Follow-ups`. Write the step so the executor copies text: it gives the heading, each entry under its group, and each link line in full. In a pre-release project, it gives each entry to add in full, and each entry to rewrite or delete by its first words and, for a rewrite, its new text in full. Only `` is left to the executor, with the `Get-Date` command. Never reformat a changelog in another format, or an older section of any changelog, unless the request asks for it, as an adopted project's follow-up does; a heading that `changelog-duplicates` names in an older release section stays as it is. A plan that converts a changelog keeps every entry's text. It dates each version's heading with its tag's date (`git log -1 --format=%as `), puts each entry in one group, and adds the preamble, `## [Unreleased]` and the link reference definitions. diff --git a/template/.github/prompts/plan-docs.prompt.md b/template/.github/prompts/plan-docs.prompt.md index e3c40c5a..6a698145 100644 --- a/template/.github/prompts/plan-docs.prompt.md +++ b/template/.github/prompts/plan-docs.prompt.md @@ -123,7 +123,7 @@ The plan's last step writes the plan's entries, for every plan: When the repository has a `version.json` at its root, which Nerdbank.GitVersioning builds each package's version from, and the plan has a `Release:` line, the same last step also sets that file's `version` to the `Release:` version without its leading `v`, such as `"1.4.0"` for `v1.4.0`, changing nothing else, and lists `version.json` on its Files line: a release tag whose commit holds another version publishes no package. When that version starts a new major version and the file's `assemblyVersion` names a `version`, the step also sets `assemblyVersion` to `{ "precision": "major" }`. The state script prints `version-file: match` when the file holds the plan's version, `mismatch ` when it holds another, and `-` without the file or a `Release:` line. -When the repository has `.github/workflows/raise-baseline.yml`, that workflow opens the pull request that raises `PackageValidationBaselineVersion` once nuget.org lists a release: a plan never raises the baseline in a step or lists raising it under `## Follow-ups`. +When the repository has `.github/workflows/raise-baseline.yml`, that workflow pushes the branch that raises `PackageValidationBaselineVersion` once nuget.org lists a release and opens an issue whose link opens its pull request: a plan never raises the baseline in a step or lists raising it under `## Follow-ups`. Write the step so the executor copies text: it gives the heading, each entry under its group, and each link line in full. In a pre-release project, it gives each entry to add in full, and each entry to rewrite or delete by its first words and, for a rewrite, its new text in full. Only `` is left to the executor, with the `Get-Date` command. Never reformat a changelog in another format, or an older section of any changelog, unless the request asks for it, as an adopted project's follow-up does; a heading that `changelog-duplicates` names in an older release section stays as it is. A plan that converts a changelog keeps every entry's text. It dates each version's heading with its tag's date (`git log -1 --format=%as `), puts each entry in one group, and adds the preamble, `## [Unreleased]` and the link reference definitions. diff --git a/template/.github/prompts/plan-feature.prompt.md b/template/.github/prompts/plan-feature.prompt.md index 704fd565..1beb231e 100644 --- a/template/.github/prompts/plan-feature.prompt.md +++ b/template/.github/prompts/plan-feature.prompt.md @@ -125,7 +125,7 @@ The plan's last step writes the plan's entries, for every plan: When the repository has a `version.json` at its root, which Nerdbank.GitVersioning builds each package's version from, and the plan has a `Release:` line, the same last step also sets that file's `version` to the `Release:` version without its leading `v`, such as `"1.4.0"` for `v1.4.0`, changing nothing else, and lists `version.json` on its Files line: a release tag whose commit holds another version publishes no package. When that version starts a new major version and the file's `assemblyVersion` names a `version`, the step also sets `assemblyVersion` to `{ "precision": "major" }`. The state script prints `version-file: match` when the file holds the plan's version, `mismatch ` when it holds another, and `-` without the file or a `Release:` line. -When the repository has `.github/workflows/raise-baseline.yml`, that workflow opens the pull request that raises `PackageValidationBaselineVersion` once nuget.org lists a release: a plan never raises the baseline in a step or lists raising it under `## Follow-ups`. +When the repository has `.github/workflows/raise-baseline.yml`, that workflow pushes the branch that raises `PackageValidationBaselineVersion` once nuget.org lists a release and opens an issue whose link opens its pull request: a plan never raises the baseline in a step or lists raising it under `## Follow-ups`. Write the step so the executor copies text: it gives the heading, each entry under its group, and each link line in full. In a pre-release project, it gives each entry to add in full, and each entry to rewrite or delete by its first words and, for a rewrite, its new text in full. Only `` is left to the executor, with the `Get-Date` command. Never reformat a changelog in another format, or an older section of any changelog, unless the request asks for it, as an adopted project's follow-up does; a heading that `changelog-duplicates` names in an older release section stays as it is. A plan that converts a changelog keeps every entry's text. It dates each version's heading with its tag's date (`git log -1 --format=%as `), puts each entry in one group, and adds the preamble, `## [Unreleased]` and the link reference definitions. diff --git a/template/.github/prompts/plan-issue.prompt.md b/template/.github/prompts/plan-issue.prompt.md index 51fd5965..202f7564 100644 --- a/template/.github/prompts/plan-issue.prompt.md +++ b/template/.github/prompts/plan-issue.prompt.md @@ -298,7 +298,7 @@ The plan's last step writes the plan's entries, for every plan: When the repository has a `version.json` at its root, which Nerdbank.GitVersioning builds each package's version from, and the plan has a `Release:` line, the same last step also sets that file's `version` to the `Release:` version without its leading `v`, such as `"1.4.0"` for `v1.4.0`, changing nothing else, and lists `version.json` on its Files line: a release tag whose commit holds another version publishes no package. When that version starts a new major version and the file's `assemblyVersion` names a `version`, the step also sets `assemblyVersion` to `{ "precision": "major" }`. The state script prints `version-file: match` when the file holds the plan's version, `mismatch ` when it holds another, and `-` without the file or a `Release:` line. -When the repository has `.github/workflows/raise-baseline.yml`, that workflow opens the pull request that raises `PackageValidationBaselineVersion` once nuget.org lists a release: a plan never raises the baseline in a step or lists raising it under `## Follow-ups`. +When the repository has `.github/workflows/raise-baseline.yml`, that workflow pushes the branch that raises `PackageValidationBaselineVersion` once nuget.org lists a release and opens an issue whose link opens its pull request: a plan never raises the baseline in a step or lists raising it under `## Follow-ups`. Write the step so the executor copies text: it gives the heading, each entry under its group, and each link line in full. In a pre-release project, it gives each entry to add in full, and each entry to rewrite or delete by its first words and, for a rewrite, its new text in full. Only `` is left to the executor, with the `Get-Date` command. Never reformat a changelog in another format, or an older section of any changelog, unless the request asks for it, as an adopted project's follow-up does; a heading that `changelog-duplicates` names in an older release section stays as it is. A plan that converts a changelog keeps every entry's text. It dates each version's heading with its tag's date (`git log -1 --format=%as `), puts each entry in one group, and adds the preamble, `## [Unreleased]` and the link reference definitions. diff --git a/template/.github/prompts/plan-migration.prompt.md b/template/.github/prompts/plan-migration.prompt.md index f82ef48c..1e2d1cc7 100644 --- a/template/.github/prompts/plan-migration.prompt.md +++ b/template/.github/prompts/plan-migration.prompt.md @@ -123,7 +123,7 @@ The plan's last step writes the plan's entries, for every plan: When the repository has a `version.json` at its root, which Nerdbank.GitVersioning builds each package's version from, and the plan has a `Release:` line, the same last step also sets that file's `version` to the `Release:` version without its leading `v`, such as `"1.4.0"` for `v1.4.0`, changing nothing else, and lists `version.json` on its Files line: a release tag whose commit holds another version publishes no package. When that version starts a new major version and the file's `assemblyVersion` names a `version`, the step also sets `assemblyVersion` to `{ "precision": "major" }`. The state script prints `version-file: match` when the file holds the plan's version, `mismatch ` when it holds another, and `-` without the file or a `Release:` line. -When the repository has `.github/workflows/raise-baseline.yml`, that workflow opens the pull request that raises `PackageValidationBaselineVersion` once nuget.org lists a release: a plan never raises the baseline in a step or lists raising it under `## Follow-ups`. +When the repository has `.github/workflows/raise-baseline.yml`, that workflow pushes the branch that raises `PackageValidationBaselineVersion` once nuget.org lists a release and opens an issue whose link opens its pull request: a plan never raises the baseline in a step or lists raising it under `## Follow-ups`. Write the step so the executor copies text: it gives the heading, each entry under its group, and each link line in full. In a pre-release project, it gives each entry to add in full, and each entry to rewrite or delete by its first words and, for a rewrite, its new text in full. Only `` is left to the executor, with the `Get-Date` command. Never reformat a changelog in another format, or an older section of any changelog, unless the request asks for it, as an adopted project's follow-up does; a heading that `changelog-duplicates` names in an older release section stays as it is. A plan that converts a changelog keeps every entry's text. It dates each version's heading with its tag's date (`git log -1 --format=%as `), puts each entry in one group, and adds the preamble, `## [Unreleased]` and the link reference definitions. diff --git a/template/.github/prompts/plan-performance.prompt.md b/template/.github/prompts/plan-performance.prompt.md index 1f98b6d2..2b9c0a37 100644 --- a/template/.github/prompts/plan-performance.prompt.md +++ b/template/.github/prompts/plan-performance.prompt.md @@ -122,7 +122,7 @@ The plan's last step writes the plan's entries, for every plan: When the repository has a `version.json` at its root, which Nerdbank.GitVersioning builds each package's version from, and the plan has a `Release:` line, the same last step also sets that file's `version` to the `Release:` version without its leading `v`, such as `"1.4.0"` for `v1.4.0`, changing nothing else, and lists `version.json` on its Files line: a release tag whose commit holds another version publishes no package. When that version starts a new major version and the file's `assemblyVersion` names a `version`, the step also sets `assemblyVersion` to `{ "precision": "major" }`. The state script prints `version-file: match` when the file holds the plan's version, `mismatch ` when it holds another, and `-` without the file or a `Release:` line. -When the repository has `.github/workflows/raise-baseline.yml`, that workflow opens the pull request that raises `PackageValidationBaselineVersion` once nuget.org lists a release: a plan never raises the baseline in a step or lists raising it under `## Follow-ups`. +When the repository has `.github/workflows/raise-baseline.yml`, that workflow pushes the branch that raises `PackageValidationBaselineVersion` once nuget.org lists a release and opens an issue whose link opens its pull request: a plan never raises the baseline in a step or lists raising it under `## Follow-ups`. Write the step so the executor copies text: it gives the heading, each entry under its group, and each link line in full. In a pre-release project, it gives each entry to add in full, and each entry to rewrite or delete by its first words and, for a rewrite, its new text in full. Only `` is left to the executor, with the `Get-Date` command. Never reformat a changelog in another format, or an older section of any changelog, unless the request asks for it, as an adopted project's follow-up does; a heading that `changelog-duplicates` names in an older release section stays as it is. A plan that converts a changelog keeps every entry's text. It dates each version's heading with its tag's date (`git log -1 --format=%as `), puts each entry in one group, and adds the preamble, `## [Unreleased]` and the link reference definitions. diff --git a/template/.github/prompts/plan-refactor.prompt.md b/template/.github/prompts/plan-refactor.prompt.md index d51da117..58bf9775 100644 --- a/template/.github/prompts/plan-refactor.prompt.md +++ b/template/.github/prompts/plan-refactor.prompt.md @@ -124,7 +124,7 @@ The plan's last step writes the plan's entries, for every plan: When the repository has a `version.json` at its root, which Nerdbank.GitVersioning builds each package's version from, and the plan has a `Release:` line, the same last step also sets that file's `version` to the `Release:` version without its leading `v`, such as `"1.4.0"` for `v1.4.0`, changing nothing else, and lists `version.json` on its Files line: a release tag whose commit holds another version publishes no package. When that version starts a new major version and the file's `assemblyVersion` names a `version`, the step also sets `assemblyVersion` to `{ "precision": "major" }`. The state script prints `version-file: match` when the file holds the plan's version, `mismatch ` when it holds another, and `-` without the file or a `Release:` line. -When the repository has `.github/workflows/raise-baseline.yml`, that workflow opens the pull request that raises `PackageValidationBaselineVersion` once nuget.org lists a release: a plan never raises the baseline in a step or lists raising it under `## Follow-ups`. +When the repository has `.github/workflows/raise-baseline.yml`, that workflow pushes the branch that raises `PackageValidationBaselineVersion` once nuget.org lists a release and opens an issue whose link opens its pull request: a plan never raises the baseline in a step or lists raising it under `## Follow-ups`. Write the step so the executor copies text: it gives the heading, each entry under its group, and each link line in full. In a pre-release project, it gives each entry to add in full, and each entry to rewrite or delete by its first words and, for a rewrite, its new text in full. Only `` is left to the executor, with the `Get-Date` command. Never reformat a changelog in another format, or an older section of any changelog, unless the request asks for it, as an adopted project's follow-up does; a heading that `changelog-duplicates` names in an older release section stays as it is. A plan that converts a changelog keeps every entry's text. It dates each version's heading with its tag's date (`git log -1 --format=%as `), puts each entry in one group, and adds the preamble, `## [Unreleased]` and the link reference definitions. diff --git a/template/.github/prompts/plan-security.prompt.md b/template/.github/prompts/plan-security.prompt.md index 7828a4d6..51c185fb 100644 --- a/template/.github/prompts/plan-security.prompt.md +++ b/template/.github/prompts/plan-security.prompt.md @@ -122,7 +122,7 @@ The plan's last step writes the plan's entries, for every plan: When the repository has a `version.json` at its root, which Nerdbank.GitVersioning builds each package's version from, and the plan has a `Release:` line, the same last step also sets that file's `version` to the `Release:` version without its leading `v`, such as `"1.4.0"` for `v1.4.0`, changing nothing else, and lists `version.json` on its Files line: a release tag whose commit holds another version publishes no package. When that version starts a new major version and the file's `assemblyVersion` names a `version`, the step also sets `assemblyVersion` to `{ "precision": "major" }`. The state script prints `version-file: match` when the file holds the plan's version, `mismatch ` when it holds another, and `-` without the file or a `Release:` line. -When the repository has `.github/workflows/raise-baseline.yml`, that workflow opens the pull request that raises `PackageValidationBaselineVersion` once nuget.org lists a release: a plan never raises the baseline in a step or lists raising it under `## Follow-ups`. +When the repository has `.github/workflows/raise-baseline.yml`, that workflow pushes the branch that raises `PackageValidationBaselineVersion` once nuget.org lists a release and opens an issue whose link opens its pull request: a plan never raises the baseline in a step or lists raising it under `## Follow-ups`. Write the step so the executor copies text: it gives the heading, each entry under its group, and each link line in full. In a pre-release project, it gives each entry to add in full, and each entry to rewrite or delete by its first words and, for a rewrite, its new text in full. Only `` is left to the executor, with the `Get-Date` command. Never reformat a changelog in another format, or an older section of any changelog, unless the request asks for it, as an adopted project's follow-up does; a heading that `changelog-duplicates` names in an older release section stays as it is. A plan that converts a changelog keeps every entry's text. It dates each version's heading with its tag's date (`git log -1 --format=%as `), puts each entry in one group, and adds the preamble, `## [Unreleased]` and the link reference definitions. diff --git a/template/.github/prompts/plan-template-update.prompt.md b/template/.github/prompts/plan-template-update.prompt.md index bf12b24f..0d4d6105 100644 --- a/template/.github/prompts/plan-template-update.prompt.md +++ b/template/.github/prompts/plan-template-update.prompt.md @@ -137,7 +137,7 @@ The plan's last step writes the plan's entries, for every plan: When the repository has a `version.json` at its root, which Nerdbank.GitVersioning builds each package's version from, and the plan has a `Release:` line, the same last step also sets that file's `version` to the `Release:` version without its leading `v`, such as `"1.4.0"` for `v1.4.0`, changing nothing else, and lists `version.json` on its Files line: a release tag whose commit holds another version publishes no package. When that version starts a new major version and the file's `assemblyVersion` names a `version`, the step also sets `assemblyVersion` to `{ "precision": "major" }`. The state script prints `version-file: match` when the file holds the plan's version, `mismatch ` when it holds another, and `-` without the file or a `Release:` line. -When the repository has `.github/workflows/raise-baseline.yml`, that workflow opens the pull request that raises `PackageValidationBaselineVersion` once nuget.org lists a release: a plan never raises the baseline in a step or lists raising it under `## Follow-ups`. +When the repository has `.github/workflows/raise-baseline.yml`, that workflow pushes the branch that raises `PackageValidationBaselineVersion` once nuget.org lists a release and opens an issue whose link opens its pull request: a plan never raises the baseline in a step or lists raising it under `## Follow-ups`. Write the step so the executor copies text: it gives the heading, each entry under its group, and each link line in full. In a pre-release project, it gives each entry to add in full, and each entry to rewrite or delete by its first words and, for a rewrite, its new text in full. Only `` is left to the executor, with the `Get-Date` command. Never reformat a changelog in another format, or an older section of any changelog, unless the request asks for it, as an adopted project's follow-up does; a heading that `changelog-duplicates` names in an older release section stays as it is. A plan that converts a changelog keeps every entry's text. It dates each version's heading with its tag's date (`git log -1 --format=%as `), puts each entry in one group, and adds the preamble, `## [Unreleased]` and the link reference definitions. diff --git a/template/.github/prompts/plan-tests.prompt.md b/template/.github/prompts/plan-tests.prompt.md index edfdff5e..ab065132 100644 --- a/template/.github/prompts/plan-tests.prompt.md +++ b/template/.github/prompts/plan-tests.prompt.md @@ -123,7 +123,7 @@ The plan's last step writes the plan's entries, for every plan: When the repository has a `version.json` at its root, which Nerdbank.GitVersioning builds each package's version from, and the plan has a `Release:` line, the same last step also sets that file's `version` to the `Release:` version without its leading `v`, such as `"1.4.0"` for `v1.4.0`, changing nothing else, and lists `version.json` on its Files line: a release tag whose commit holds another version publishes no package. When that version starts a new major version and the file's `assemblyVersion` names a `version`, the step also sets `assemblyVersion` to `{ "precision": "major" }`. The state script prints `version-file: match` when the file holds the plan's version, `mismatch ` when it holds another, and `-` without the file or a `Release:` line. -When the repository has `.github/workflows/raise-baseline.yml`, that workflow opens the pull request that raises `PackageValidationBaselineVersion` once nuget.org lists a release: a plan never raises the baseline in a step or lists raising it under `## Follow-ups`. +When the repository has `.github/workflows/raise-baseline.yml`, that workflow pushes the branch that raises `PackageValidationBaselineVersion` once nuget.org lists a release and opens an issue whose link opens its pull request: a plan never raises the baseline in a step or lists raising it under `## Follow-ups`. Write the step so the executor copies text: it gives the heading, each entry under its group, and each link line in full. In a pre-release project, it gives each entry to add in full, and each entry to rewrite or delete by its first words and, for a rewrite, its new text in full. Only `` is left to the executor, with the `Get-Date` command. Never reformat a changelog in another format, or an older section of any changelog, unless the request asks for it, as an adopted project's follow-up does; a heading that `changelog-duplicates` names in an older release section stays as it is. A plan that converts a changelog keeps every entry's text. It dates each version's heading with its tag's date (`git log -1 --format=%as `), puts each entry in one group, and adds the preamble, `## [Unreleased]` and the link reference definitions. diff --git a/template/.github/prompts/ship-plan.prompt.md b/template/.github/prompts/ship-plan.prompt.md index d644c653..385713a7 100644 --- a/template/.github/prompts/ship-plan.prompt.md +++ b/template/.github/prompts/ship-plan.prompt.md @@ -111,7 +111,7 @@ The plan's last step writes the plan's entries, for every plan: When the repository has a `version.json` at its root, which Nerdbank.GitVersioning builds each package's version from, and the plan has a `Release:` line, the same last step also sets that file's `version` to the `Release:` version without its leading `v`, such as `"1.4.0"` for `v1.4.0`, changing nothing else, and lists `version.json` on its Files line: a release tag whose commit holds another version publishes no package. When that version starts a new major version and the file's `assemblyVersion` names a `version`, the step also sets `assemblyVersion` to `{ "precision": "major" }`. The state script prints `version-file: match` when the file holds the plan's version, `mismatch ` when it holds another, and `-` without the file or a `Release:` line. -When the repository has `.github/workflows/raise-baseline.yml`, that workflow opens the pull request that raises `PackageValidationBaselineVersion` once nuget.org lists a release: a plan never raises the baseline in a step or lists raising it under `## Follow-ups`. +When the repository has `.github/workflows/raise-baseline.yml`, that workflow pushes the branch that raises `PackageValidationBaselineVersion` once nuget.org lists a release and opens an issue whose link opens its pull request: a plan never raises the baseline in a step or lists raising it under `## Follow-ups`. Write the step so the executor copies text: it gives the heading, each entry under its group, and each link line in full. In a pre-release project, it gives each entry to add in full, and each entry to rewrite or delete by its first words and, for a rewrite, its new text in full. Only `` is left to the executor, with the `Get-Date` command. Never reformat a changelog in another format, or an older section of any changelog, unless the request asks for it, as an adopted project's follow-up does; a heading that `changelog-duplicates` names in an older release section stays as it is. A plan that converts a changelog keeps every entry's text. It dates each version's heading with its tag's date (`git log -1 --format=%as `), puts each entry in one group, and adds the preamble, `## [Unreleased]` and the link reference definitions. diff --git a/template/.github/skills/handoff-plan/SKILL.md b/template/.github/skills/handoff-plan/SKILL.md index 1d2cd9eb..458a5556 100644 --- a/template/.github/skills/handoff-plan/SKILL.md +++ b/template/.github/skills/handoff-plan/SKILL.md @@ -121,7 +121,7 @@ The plan's last step writes the plan's entries, for every plan: When the repository has a `version.json` at its root, which Nerdbank.GitVersioning builds each package's version from, and the plan has a `Release:` line, the same last step also sets that file's `version` to the `Release:` version without its leading `v`, such as `"1.4.0"` for `v1.4.0`, changing nothing else, and lists `version.json` on its Files line: a release tag whose commit holds another version publishes no package. When that version starts a new major version and the file's `assemblyVersion` names a `version`, the step also sets `assemblyVersion` to `{ "precision": "major" }`. The state script prints `version-file: match` when the file holds the plan's version, `mismatch ` when it holds another, and `-` without the file or a `Release:` line. -When the repository has `.github/workflows/raise-baseline.yml`, that workflow opens the pull request that raises `PackageValidationBaselineVersion` once nuget.org lists a release: a plan never raises the baseline in a step or lists raising it under `## Follow-ups`. +When the repository has `.github/workflows/raise-baseline.yml`, that workflow pushes the branch that raises `PackageValidationBaselineVersion` once nuget.org lists a release and opens an issue whose link opens its pull request: a plan never raises the baseline in a step or lists raising it under `## Follow-ups`. Write the step so the executor copies text: it gives the heading, each entry under its group, and each link line in full. In a pre-release project, it gives each entry to add in full, and each entry to rewrite or delete by its first words and, for a rewrite, its new text in full. Only `` is left to the executor, with the `Get-Date` command. Never reformat a changelog in another format, or an older section of any changelog, unless the request asks for it, as an adopted project's follow-up does; a heading that `changelog-duplicates` names in an older release section stays as it is. A plan that converts a changelog keeps every entry's text. It dates each version's heading with its tag's date (`git log -1 --format=%as `), puts each entry in one group, and adds the preamble, `## [Unreleased]` and the link reference definitions. diff --git a/template/.github/skills/plan-bugfix/SKILL.md b/template/.github/skills/plan-bugfix/SKILL.md index e11d4cd8..21a5fbe7 100644 --- a/template/.github/skills/plan-bugfix/SKILL.md +++ b/template/.github/skills/plan-bugfix/SKILL.md @@ -123,7 +123,7 @@ The plan's last step writes the plan's entries, for every plan: When the repository has a `version.json` at its root, which Nerdbank.GitVersioning builds each package's version from, and the plan has a `Release:` line, the same last step also sets that file's `version` to the `Release:` version without its leading `v`, such as `"1.4.0"` for `v1.4.0`, changing nothing else, and lists `version.json` on its Files line: a release tag whose commit holds another version publishes no package. When that version starts a new major version and the file's `assemblyVersion` names a `version`, the step also sets `assemblyVersion` to `{ "precision": "major" }`. The state script prints `version-file: match` when the file holds the plan's version, `mismatch ` when it holds another, and `-` without the file or a `Release:` line. -When the repository has `.github/workflows/raise-baseline.yml`, that workflow opens the pull request that raises `PackageValidationBaselineVersion` once nuget.org lists a release: a plan never raises the baseline in a step or lists raising it under `## Follow-ups`. +When the repository has `.github/workflows/raise-baseline.yml`, that workflow pushes the branch that raises `PackageValidationBaselineVersion` once nuget.org lists a release and opens an issue whose link opens its pull request: a plan never raises the baseline in a step or lists raising it under `## Follow-ups`. Write the step so the executor copies text: it gives the heading, each entry under its group, and each link line in full. In a pre-release project, it gives each entry to add in full, and each entry to rewrite or delete by its first words and, for a rewrite, its new text in full. Only `` is left to the executor, with the `Get-Date` command. Never reformat a changelog in another format, or an older section of any changelog, unless the request asks for it, as an adopted project's follow-up does; a heading that `changelog-duplicates` names in an older release section stays as it is. A plan that converts a changelog keeps every entry's text. It dates each version's heading with its tag's date (`git log -1 --format=%as `), puts each entry in one group, and adds the preamble, `## [Unreleased]` and the link reference definitions. diff --git a/template/.github/skills/plan-docs/SKILL.md b/template/.github/skills/plan-docs/SKILL.md index fb9e27ab..992f7058 100644 --- a/template/.github/skills/plan-docs/SKILL.md +++ b/template/.github/skills/plan-docs/SKILL.md @@ -121,7 +121,7 @@ The plan's last step writes the plan's entries, for every plan: When the repository has a `version.json` at its root, which Nerdbank.GitVersioning builds each package's version from, and the plan has a `Release:` line, the same last step also sets that file's `version` to the `Release:` version without its leading `v`, such as `"1.4.0"` for `v1.4.0`, changing nothing else, and lists `version.json` on its Files line: a release tag whose commit holds another version publishes no package. When that version starts a new major version and the file's `assemblyVersion` names a `version`, the step also sets `assemblyVersion` to `{ "precision": "major" }`. The state script prints `version-file: match` when the file holds the plan's version, `mismatch ` when it holds another, and `-` without the file or a `Release:` line. -When the repository has `.github/workflows/raise-baseline.yml`, that workflow opens the pull request that raises `PackageValidationBaselineVersion` once nuget.org lists a release: a plan never raises the baseline in a step or lists raising it under `## Follow-ups`. +When the repository has `.github/workflows/raise-baseline.yml`, that workflow pushes the branch that raises `PackageValidationBaselineVersion` once nuget.org lists a release and opens an issue whose link opens its pull request: a plan never raises the baseline in a step or lists raising it under `## Follow-ups`. Write the step so the executor copies text: it gives the heading, each entry under its group, and each link line in full. In a pre-release project, it gives each entry to add in full, and each entry to rewrite or delete by its first words and, for a rewrite, its new text in full. Only `` is left to the executor, with the `Get-Date` command. Never reformat a changelog in another format, or an older section of any changelog, unless the request asks for it, as an adopted project's follow-up does; a heading that `changelog-duplicates` names in an older release section stays as it is. A plan that converts a changelog keeps every entry's text. It dates each version's heading with its tag's date (`git log -1 --format=%as `), puts each entry in one group, and adds the preamble, `## [Unreleased]` and the link reference definitions. diff --git a/template/.github/skills/plan-feature/SKILL.md b/template/.github/skills/plan-feature/SKILL.md index 2b57f7c8..c05ff507 100644 --- a/template/.github/skills/plan-feature/SKILL.md +++ b/template/.github/skills/plan-feature/SKILL.md @@ -123,7 +123,7 @@ The plan's last step writes the plan's entries, for every plan: When the repository has a `version.json` at its root, which Nerdbank.GitVersioning builds each package's version from, and the plan has a `Release:` line, the same last step also sets that file's `version` to the `Release:` version without its leading `v`, such as `"1.4.0"` for `v1.4.0`, changing nothing else, and lists `version.json` on its Files line: a release tag whose commit holds another version publishes no package. When that version starts a new major version and the file's `assemblyVersion` names a `version`, the step also sets `assemblyVersion` to `{ "precision": "major" }`. The state script prints `version-file: match` when the file holds the plan's version, `mismatch ` when it holds another, and `-` without the file or a `Release:` line. -When the repository has `.github/workflows/raise-baseline.yml`, that workflow opens the pull request that raises `PackageValidationBaselineVersion` once nuget.org lists a release: a plan never raises the baseline in a step or lists raising it under `## Follow-ups`. +When the repository has `.github/workflows/raise-baseline.yml`, that workflow pushes the branch that raises `PackageValidationBaselineVersion` once nuget.org lists a release and opens an issue whose link opens its pull request: a plan never raises the baseline in a step or lists raising it under `## Follow-ups`. Write the step so the executor copies text: it gives the heading, each entry under its group, and each link line in full. In a pre-release project, it gives each entry to add in full, and each entry to rewrite or delete by its first words and, for a rewrite, its new text in full. Only `` is left to the executor, with the `Get-Date` command. Never reformat a changelog in another format, or an older section of any changelog, unless the request asks for it, as an adopted project's follow-up does; a heading that `changelog-duplicates` names in an older release section stays as it is. A plan that converts a changelog keeps every entry's text. It dates each version's heading with its tag's date (`git log -1 --format=%as `), puts each entry in one group, and adds the preamble, `## [Unreleased]` and the link reference definitions. diff --git a/template/.github/skills/plan-issue/SKILL.md b/template/.github/skills/plan-issue/SKILL.md index 9a01b6ec..45e98de0 100644 --- a/template/.github/skills/plan-issue/SKILL.md +++ b/template/.github/skills/plan-issue/SKILL.md @@ -296,7 +296,7 @@ The plan's last step writes the plan's entries, for every plan: When the repository has a `version.json` at its root, which Nerdbank.GitVersioning builds each package's version from, and the plan has a `Release:` line, the same last step also sets that file's `version` to the `Release:` version without its leading `v`, such as `"1.4.0"` for `v1.4.0`, changing nothing else, and lists `version.json` on its Files line: a release tag whose commit holds another version publishes no package. When that version starts a new major version and the file's `assemblyVersion` names a `version`, the step also sets `assemblyVersion` to `{ "precision": "major" }`. The state script prints `version-file: match` when the file holds the plan's version, `mismatch ` when it holds another, and `-` without the file or a `Release:` line. -When the repository has `.github/workflows/raise-baseline.yml`, that workflow opens the pull request that raises `PackageValidationBaselineVersion` once nuget.org lists a release: a plan never raises the baseline in a step or lists raising it under `## Follow-ups`. +When the repository has `.github/workflows/raise-baseline.yml`, that workflow pushes the branch that raises `PackageValidationBaselineVersion` once nuget.org lists a release and opens an issue whose link opens its pull request: a plan never raises the baseline in a step or lists raising it under `## Follow-ups`. Write the step so the executor copies text: it gives the heading, each entry under its group, and each link line in full. In a pre-release project, it gives each entry to add in full, and each entry to rewrite or delete by its first words and, for a rewrite, its new text in full. Only `` is left to the executor, with the `Get-Date` command. Never reformat a changelog in another format, or an older section of any changelog, unless the request asks for it, as an adopted project's follow-up does; a heading that `changelog-duplicates` names in an older release section stays as it is. A plan that converts a changelog keeps every entry's text. It dates each version's heading with its tag's date (`git log -1 --format=%as `), puts each entry in one group, and adds the preamble, `## [Unreleased]` and the link reference definitions. diff --git a/template/.github/skills/plan-migration/SKILL.md b/template/.github/skills/plan-migration/SKILL.md index dc8b1ae5..94c4bc53 100644 --- a/template/.github/skills/plan-migration/SKILL.md +++ b/template/.github/skills/plan-migration/SKILL.md @@ -121,7 +121,7 @@ The plan's last step writes the plan's entries, for every plan: When the repository has a `version.json` at its root, which Nerdbank.GitVersioning builds each package's version from, and the plan has a `Release:` line, the same last step also sets that file's `version` to the `Release:` version without its leading `v`, such as `"1.4.0"` for `v1.4.0`, changing nothing else, and lists `version.json` on its Files line: a release tag whose commit holds another version publishes no package. When that version starts a new major version and the file's `assemblyVersion` names a `version`, the step also sets `assemblyVersion` to `{ "precision": "major" }`. The state script prints `version-file: match` when the file holds the plan's version, `mismatch ` when it holds another, and `-` without the file or a `Release:` line. -When the repository has `.github/workflows/raise-baseline.yml`, that workflow opens the pull request that raises `PackageValidationBaselineVersion` once nuget.org lists a release: a plan never raises the baseline in a step or lists raising it under `## Follow-ups`. +When the repository has `.github/workflows/raise-baseline.yml`, that workflow pushes the branch that raises `PackageValidationBaselineVersion` once nuget.org lists a release and opens an issue whose link opens its pull request: a plan never raises the baseline in a step or lists raising it under `## Follow-ups`. Write the step so the executor copies text: it gives the heading, each entry under its group, and each link line in full. In a pre-release project, it gives each entry to add in full, and each entry to rewrite or delete by its first words and, for a rewrite, its new text in full. Only `` is left to the executor, with the `Get-Date` command. Never reformat a changelog in another format, or an older section of any changelog, unless the request asks for it, as an adopted project's follow-up does; a heading that `changelog-duplicates` names in an older release section stays as it is. A plan that converts a changelog keeps every entry's text. It dates each version's heading with its tag's date (`git log -1 --format=%as `), puts each entry in one group, and adds the preamble, `## [Unreleased]` and the link reference definitions. diff --git a/template/.github/skills/plan-performance/SKILL.md b/template/.github/skills/plan-performance/SKILL.md index ac64d9f0..f6df8996 100644 --- a/template/.github/skills/plan-performance/SKILL.md +++ b/template/.github/skills/plan-performance/SKILL.md @@ -120,7 +120,7 @@ The plan's last step writes the plan's entries, for every plan: When the repository has a `version.json` at its root, which Nerdbank.GitVersioning builds each package's version from, and the plan has a `Release:` line, the same last step also sets that file's `version` to the `Release:` version without its leading `v`, such as `"1.4.0"` for `v1.4.0`, changing nothing else, and lists `version.json` on its Files line: a release tag whose commit holds another version publishes no package. When that version starts a new major version and the file's `assemblyVersion` names a `version`, the step also sets `assemblyVersion` to `{ "precision": "major" }`. The state script prints `version-file: match` when the file holds the plan's version, `mismatch ` when it holds another, and `-` without the file or a `Release:` line. -When the repository has `.github/workflows/raise-baseline.yml`, that workflow opens the pull request that raises `PackageValidationBaselineVersion` once nuget.org lists a release: a plan never raises the baseline in a step or lists raising it under `## Follow-ups`. +When the repository has `.github/workflows/raise-baseline.yml`, that workflow pushes the branch that raises `PackageValidationBaselineVersion` once nuget.org lists a release and opens an issue whose link opens its pull request: a plan never raises the baseline in a step or lists raising it under `## Follow-ups`. Write the step so the executor copies text: it gives the heading, each entry under its group, and each link line in full. In a pre-release project, it gives each entry to add in full, and each entry to rewrite or delete by its first words and, for a rewrite, its new text in full. Only `` is left to the executor, with the `Get-Date` command. Never reformat a changelog in another format, or an older section of any changelog, unless the request asks for it, as an adopted project's follow-up does; a heading that `changelog-duplicates` names in an older release section stays as it is. A plan that converts a changelog keeps every entry's text. It dates each version's heading with its tag's date (`git log -1 --format=%as `), puts each entry in one group, and adds the preamble, `## [Unreleased]` and the link reference definitions. diff --git a/template/.github/skills/plan-refactor/SKILL.md b/template/.github/skills/plan-refactor/SKILL.md index 253a4574..df01206e 100644 --- a/template/.github/skills/plan-refactor/SKILL.md +++ b/template/.github/skills/plan-refactor/SKILL.md @@ -122,7 +122,7 @@ The plan's last step writes the plan's entries, for every plan: When the repository has a `version.json` at its root, which Nerdbank.GitVersioning builds each package's version from, and the plan has a `Release:` line, the same last step also sets that file's `version` to the `Release:` version without its leading `v`, such as `"1.4.0"` for `v1.4.0`, changing nothing else, and lists `version.json` on its Files line: a release tag whose commit holds another version publishes no package. When that version starts a new major version and the file's `assemblyVersion` names a `version`, the step also sets `assemblyVersion` to `{ "precision": "major" }`. The state script prints `version-file: match` when the file holds the plan's version, `mismatch ` when it holds another, and `-` without the file or a `Release:` line. -When the repository has `.github/workflows/raise-baseline.yml`, that workflow opens the pull request that raises `PackageValidationBaselineVersion` once nuget.org lists a release: a plan never raises the baseline in a step or lists raising it under `## Follow-ups`. +When the repository has `.github/workflows/raise-baseline.yml`, that workflow pushes the branch that raises `PackageValidationBaselineVersion` once nuget.org lists a release and opens an issue whose link opens its pull request: a plan never raises the baseline in a step or lists raising it under `## Follow-ups`. Write the step so the executor copies text: it gives the heading, each entry under its group, and each link line in full. In a pre-release project, it gives each entry to add in full, and each entry to rewrite or delete by its first words and, for a rewrite, its new text in full. Only `` is left to the executor, with the `Get-Date` command. Never reformat a changelog in another format, or an older section of any changelog, unless the request asks for it, as an adopted project's follow-up does; a heading that `changelog-duplicates` names in an older release section stays as it is. A plan that converts a changelog keeps every entry's text. It dates each version's heading with its tag's date (`git log -1 --format=%as `), puts each entry in one group, and adds the preamble, `## [Unreleased]` and the link reference definitions. diff --git a/template/.github/skills/plan-security/SKILL.md b/template/.github/skills/plan-security/SKILL.md index 0a7d03b6..909c9a02 100644 --- a/template/.github/skills/plan-security/SKILL.md +++ b/template/.github/skills/plan-security/SKILL.md @@ -120,7 +120,7 @@ The plan's last step writes the plan's entries, for every plan: When the repository has a `version.json` at its root, which Nerdbank.GitVersioning builds each package's version from, and the plan has a `Release:` line, the same last step also sets that file's `version` to the `Release:` version without its leading `v`, such as `"1.4.0"` for `v1.4.0`, changing nothing else, and lists `version.json` on its Files line: a release tag whose commit holds another version publishes no package. When that version starts a new major version and the file's `assemblyVersion` names a `version`, the step also sets `assemblyVersion` to `{ "precision": "major" }`. The state script prints `version-file: match` when the file holds the plan's version, `mismatch ` when it holds another, and `-` without the file or a `Release:` line. -When the repository has `.github/workflows/raise-baseline.yml`, that workflow opens the pull request that raises `PackageValidationBaselineVersion` once nuget.org lists a release: a plan never raises the baseline in a step or lists raising it under `## Follow-ups`. +When the repository has `.github/workflows/raise-baseline.yml`, that workflow pushes the branch that raises `PackageValidationBaselineVersion` once nuget.org lists a release and opens an issue whose link opens its pull request: a plan never raises the baseline in a step or lists raising it under `## Follow-ups`. Write the step so the executor copies text: it gives the heading, each entry under its group, and each link line in full. In a pre-release project, it gives each entry to add in full, and each entry to rewrite or delete by its first words and, for a rewrite, its new text in full. Only `` is left to the executor, with the `Get-Date` command. Never reformat a changelog in another format, or an older section of any changelog, unless the request asks for it, as an adopted project's follow-up does; a heading that `changelog-duplicates` names in an older release section stays as it is. A plan that converts a changelog keeps every entry's text. It dates each version's heading with its tag's date (`git log -1 --format=%as `), puts each entry in one group, and adds the preamble, `## [Unreleased]` and the link reference definitions. diff --git a/template/.github/skills/plan-template-update/SKILL.md b/template/.github/skills/plan-template-update/SKILL.md index ef4e9f8f..5c71b7a8 100644 --- a/template/.github/skills/plan-template-update/SKILL.md +++ b/template/.github/skills/plan-template-update/SKILL.md @@ -135,7 +135,7 @@ The plan's last step writes the plan's entries, for every plan: When the repository has a `version.json` at its root, which Nerdbank.GitVersioning builds each package's version from, and the plan has a `Release:` line, the same last step also sets that file's `version` to the `Release:` version without its leading `v`, such as `"1.4.0"` for `v1.4.0`, changing nothing else, and lists `version.json` on its Files line: a release tag whose commit holds another version publishes no package. When that version starts a new major version and the file's `assemblyVersion` names a `version`, the step also sets `assemblyVersion` to `{ "precision": "major" }`. The state script prints `version-file: match` when the file holds the plan's version, `mismatch ` when it holds another, and `-` without the file or a `Release:` line. -When the repository has `.github/workflows/raise-baseline.yml`, that workflow opens the pull request that raises `PackageValidationBaselineVersion` once nuget.org lists a release: a plan never raises the baseline in a step or lists raising it under `## Follow-ups`. +When the repository has `.github/workflows/raise-baseline.yml`, that workflow pushes the branch that raises `PackageValidationBaselineVersion` once nuget.org lists a release and opens an issue whose link opens its pull request: a plan never raises the baseline in a step or lists raising it under `## Follow-ups`. Write the step so the executor copies text: it gives the heading, each entry under its group, and each link line in full. In a pre-release project, it gives each entry to add in full, and each entry to rewrite or delete by its first words and, for a rewrite, its new text in full. Only `` is left to the executor, with the `Get-Date` command. Never reformat a changelog in another format, or an older section of any changelog, unless the request asks for it, as an adopted project's follow-up does; a heading that `changelog-duplicates` names in an older release section stays as it is. A plan that converts a changelog keeps every entry's text. It dates each version's heading with its tag's date (`git log -1 --format=%as `), puts each entry in one group, and adds the preamble, `## [Unreleased]` and the link reference definitions. diff --git a/template/.github/skills/plan-tests/SKILL.md b/template/.github/skills/plan-tests/SKILL.md index 67c326ec..3d258e28 100644 --- a/template/.github/skills/plan-tests/SKILL.md +++ b/template/.github/skills/plan-tests/SKILL.md @@ -121,7 +121,7 @@ The plan's last step writes the plan's entries, for every plan: When the repository has a `version.json` at its root, which Nerdbank.GitVersioning builds each package's version from, and the plan has a `Release:` line, the same last step also sets that file's `version` to the `Release:` version without its leading `v`, such as `"1.4.0"` for `v1.4.0`, changing nothing else, and lists `version.json` on its Files line: a release tag whose commit holds another version publishes no package. When that version starts a new major version and the file's `assemblyVersion` names a `version`, the step also sets `assemblyVersion` to `{ "precision": "major" }`. The state script prints `version-file: match` when the file holds the plan's version, `mismatch ` when it holds another, and `-` without the file or a `Release:` line. -When the repository has `.github/workflows/raise-baseline.yml`, that workflow opens the pull request that raises `PackageValidationBaselineVersion` once nuget.org lists a release: a plan never raises the baseline in a step or lists raising it under `## Follow-ups`. +When the repository has `.github/workflows/raise-baseline.yml`, that workflow pushes the branch that raises `PackageValidationBaselineVersion` once nuget.org lists a release and opens an issue whose link opens its pull request: a plan never raises the baseline in a step or lists raising it under `## Follow-ups`. Write the step so the executor copies text: it gives the heading, each entry under its group, and each link line in full. In a pre-release project, it gives each entry to add in full, and each entry to rewrite or delete by its first words and, for a rewrite, its new text in full. Only `` is left to the executor, with the `Get-Date` command. Never reformat a changelog in another format, or an older section of any changelog, unless the request asks for it, as an adopted project's follow-up does; a heading that `changelog-duplicates` names in an older release section stays as it is. A plan that converts a changelog keeps every entry's text. It dates each version's heading with its tag's date (`git log -1 --format=%as `), puts each entry in one group, and adds the preamble, `## [Unreleased]` and the link reference definitions. diff --git a/template/.github/skills/ship-plan/SKILL.md b/template/.github/skills/ship-plan/SKILL.md index a79c5262..65bfb25a 100644 --- a/template/.github/skills/ship-plan/SKILL.md +++ b/template/.github/skills/ship-plan/SKILL.md @@ -109,7 +109,7 @@ The plan's last step writes the plan's entries, for every plan: When the repository has a `version.json` at its root, which Nerdbank.GitVersioning builds each package's version from, and the plan has a `Release:` line, the same last step also sets that file's `version` to the `Release:` version without its leading `v`, such as `"1.4.0"` for `v1.4.0`, changing nothing else, and lists `version.json` on its Files line: a release tag whose commit holds another version publishes no package. When that version starts a new major version and the file's `assemblyVersion` names a `version`, the step also sets `assemblyVersion` to `{ "precision": "major" }`. The state script prints `version-file: match` when the file holds the plan's version, `mismatch ` when it holds another, and `-` without the file or a `Release:` line. -When the repository has `.github/workflows/raise-baseline.yml`, that workflow opens the pull request that raises `PackageValidationBaselineVersion` once nuget.org lists a release: a plan never raises the baseline in a step or lists raising it under `## Follow-ups`. +When the repository has `.github/workflows/raise-baseline.yml`, that workflow pushes the branch that raises `PackageValidationBaselineVersion` once nuget.org lists a release and opens an issue whose link opens its pull request: a plan never raises the baseline in a step or lists raising it under `## Follow-ups`. Write the step so the executor copies text: it gives the heading, each entry under its group, and each link line in full. In a pre-release project, it gives each entry to add in full, and each entry to rewrite or delete by its first words and, for a rewrite, its new text in full. Only `` is left to the executor, with the `Get-Date` command. Never reformat a changelog in another format, or an older section of any changelog, unless the request asks for it, as an adopted project's follow-up does; a heading that `changelog-duplicates` names in an older release section stays as it is. A plan that converts a changelog keeps every entry's text. It dates each version's heading with its tag's date (`git log -1 --format=%as `), puts each entry in one group, and adds the preamble, `## [Unreleased]` and the link reference definitions. diff --git a/template/.github/workflows/code-review-auto-merge.yml b/template/.github/workflows/code-review-auto-merge.yml index 0d13445b..2a98fa74 100644 --- a/template/.github/workflows/code-review-auto-merge.yml +++ b/template/.github/workflows/code-review-auto-merge.yml @@ -5,10 +5,12 @@ name: Code review auto-merge # it changes is in .github/workflows and is that action's uses: line, pinned to a release's full commit SHA with its tag # in a comment. The ncode-review group in .github/dependabot.yml gives that bump a pull request of its own, apart from # the other actions' updates. The pull request then merges by itself once the checks the default branch requires pass -# and, where the ruleset requires an approval (code-review.yml passing approve: true where a second person has write -# access), a maintainer approves it, since NCode Review skips a bot's pull request and this workflow approves nothing -# (docs/decisions/project-template/0022-ncode-reviews-approval-gates-the-merge.md and -# 0034-with-one-writer-the-baseline-requires-no-approval.md). +# and, where the ruleset requires an approval (where NCode Review's approver is set up, or code-review.yml passes +# approve: true and a second person has write access), a maintainer approves it, since NCode Review skips a bot's pull +# request and this workflow approves nothing +# (docs/decisions/project-template/0022-ncode-reviews-approval-gates-the-merge.md, +# 0034-with-one-writer-the-baseline-requires-no-approval.md and +# 0036-a-required-approval-is-met-by-ncode-reviews-approver-app.md). # A major release, which may change the inputs the caller passes, a pull request that updates other dependencies too, # and one that changes any other line wait for you. Auto-merge has to be allowed in the repository's settings, which # tools/Set-RepositoryBaseline.ps1 in NCodeGroup/project-template turns on. A project without code-review.yml gets no diff --git a/template/.github/workflows/code-review.yml b/template/.github/workflows/code-review.yml index 5fa3a5a3..908ad5c8 100644 --- a/template/.github/workflows/code-review.yml +++ b/template/.github/workflows/code-review.yml @@ -9,17 +9,21 @@ name: Code review # such as an agent's `---` line and attribution, which NCode Review sets aside; `/review explain F3` says whether a # finding still holds, and `/review teach ` files a rule as an issue, both on a closed pull request too. A # `skip-review` label skips the automatic reviews. When a pull request closes, merged or not, the outcomes job only -# records each posted finding's outcome, with no model call. It needs no environment: the app's key is an organization -# secret, and the code-review environment holds none; it only lets Anthropic's federation rule trust the review job. +# records each posted finding's outcome, with no model call. It needs no environment: the NCode Review app's key is an +# organization secret. The code-review environment, which only the default branch can deploy to, holds the approver's +# key, NCODE_REVIEW_APPROVER_PRIVATE_KEY, once it is stored, and lets Anthropic's federation rule trust the review job. # -# approve: true (v1.4.0 on) approves a pull request whose review leaves no blocker or should-fix finding open, which -# Scorecard's Code-Review check counts, but it meets no required approval: GitHub counts toward one only a review from -# someone with write access, and NCode Review's app has none. tools/Set-RepositoryBaseline.ps1 in the project template -# requires one approval, of the last push, only once a second person has write access, and someone with write access -# other than the author gives it; with one writer it requires none. A push dismisses NCode Review's approval, so +# approve: true approves a pull request whose review leaves no blocker or should-fix finding open, which Scorecard's +# Code-Review check counts. GitHub counts an approval toward a ruleset's required approval only from a reviewer that can +# write, so the approval is submitted by the NCode Review Approver (v1.5.0 on), an app with Contents: write whose token, +# minted after the review, can only write pull requests. tools/Enable-CodeReview.ps1 -ApproverPrivateKeyPath in +# NCodeGroup/code-review stores its key in the code-review environment. With it, tools/Set-RepositoryBaseline.ps1 in the +# project template requires one approval, of the last push; without it, NCode Review's own app approves, which meets no +# required approval, and the baseline requires none where one person can write. A push dismisses the approval, so # comment /review after one; a maintainer approves a bot's pull request, which NCode Review skips. -# docs/decisions/project-template/0022-ncode-reviews-approval-gates-the-merge.md and -# 0034-with-one-writer-the-baseline-requires-no-approval.md say why. +# docs/decisions/project-template/0022-ncode-reviews-approval-gates-the-merge.md, +# 0034-with-one-writer-the-baseline-requires-no-approval.md and +# 0036-a-required-approval-is-met-by-ncode-reviews-approver-app.md say why. # # pull_request_target and issue_comment both run this file from the default branch, so a pull request can't change its # own review. The engine fetches its code only to read it: nothing from it is built, run or installed. @@ -31,7 +35,7 @@ name: Code review # updates the SHA and the tag. # Run tools/Enable-CodeReview.ps1 from a clone of NCodeGroup/code-review once for this repository: it creates the # code-review environment, which only the default branch can deploy to, and gives the repository access to the -# organization's two secrets. +# organization's two secrets; -ApproverPrivateKeyPath stores the approver's key in that environment. on: pull_request_target: @@ -83,12 +87,14 @@ jobs: persist-credentials: false - name: Review - uses: NCodeGroup/code-review@d1233665998b66af6ec3d9e40d90a4638c235a67 # v1.4.0 + uses: NCodeGroup/code-review@a4cdf65d2450e4e1b2b92ed53430ceb8026d4f97 # v1.5.0 with: app-private-key: ${{ secrets.NCODE_REVIEW_APP_PRIVATE_KEY }} bedrock-api-key: ${{ secrets.AWS_BEARER_TOKEN_BEDROCK }} # A review that leaves no blocker or should-fix finding open approves the pull request. approve: true + # The NCode Review Approver submits the approval, so it meets the ruleset's required approval; the key is a secret of the code-review environment, which only the default branch can deploy to. + approver-private-key: ${{ secrets.NCODE_REVIEW_APPROVER_PRIVATE_KEY }} outcomes: # A closed pull request, merged or not, whoever closed it (a merge queue merges as a bot) and whatever its labels: @@ -109,6 +115,6 @@ jobs: pull-requests: read steps: - name: Record the outcomes - uses: NCodeGroup/code-review@d1233665998b66af6ec3d9e40d90a4638c235a67 # v1.4.0 + uses: NCodeGroup/code-review@a4cdf65d2450e4e1b2b92ed53430ceb8026d4f97 # v1.5.0 with: app-private-key: ${{ secrets.NCODE_REVIEW_APP_PRIVATE_KEY }} diff --git a/template/.github/workflows/publish.yml b/template/.github/workflows/publish.yml index 0113c082..90ef45b8 100644 --- a/template/.github/workflows/publish.yml +++ b/template/.github/workflows/publish.yml @@ -9,8 +9,9 @@ # - publish runs in the protected `nuget` environment, exchanges the job's OIDC token for a short-lived nuget.org API # key through nuget.org trusted publishing, and pushes them. A rerun skips the packages already pushed; # - provenance calls release-provenance.yml, which attests the packages and attaches them, the provenance and an SBOM -# to the release, and baseline calls raise-baseline.yml, which opens the pull request that raises the package -# validation baseline, for a stable version only (the template's ADR-0151). +# to the release, and baseline calls raise-baseline.yml, which pushes the branch that raises the package validation +# baseline and opens an issue whose link opens its pull request, for a stable version only (the template's ADR-0151 +# and ADR-0036). # # A release made with a workflow's GITHUB_TOKEN, as tag-release.yml makes it, starts no workflow, so tag-release.yml # starts this one through workflow_dispatch, on the tag and with the tag as input. To publish a release by hand: diff --git a/template/.github/workflows/raise-baseline.yml b/template/.github/workflows/raise-baseline.yml index 55f3e8f6..62d751c1 100644 --- a/template/.github/workflows/raise-baseline.yml +++ b/template/.github/workflows/raise-baseline.yml @@ -1,14 +1,14 @@ # Raise the package validation baseline: publish.yml calls this workflow as its baseline job after it publishes a stable # release, or a person runs it by hand with a release tag. It runs build/Update-Baseline.ps1, which waits for nuget.org # to list the version and raises PackageValidationBaselineVersion to it, removing the baseline suppressions a new major -# version leaves behind, then pushes baseline-, opens it as a draft pull request, which a person marks ready -# and merges, and starts CI on its branch, because a pull request opened with the workflow's token starts no workflow. -# It is not started by a workflow-run trigger, which GitHub never fires for the run tag-release.yml starts with -# GITHUB_TOKEN. The template's ADR-0150 and ADR-0151 say why; it changes nothing until the project sets the baseline -# once (ADR-0147). +# version leaves behind, then pushes baseline- and opens an issue with a link that opens the pull request, its +# title and description filled in, `Closes #` included. A person opens it, which starts CI and NCode Review's +# review, so the workflow needs no "Allow GitHub Actions to create and approve pull requests", which +# tools/Set-RepositoryBaseline.ps1 keeps off (ADR-0036). A rerun finds the branch and its open issue, pushes nothing, +# and writes the issue's link again, so a run that failed after the push is finished by running it again. It is not +# started by a workflow-run trigger, which GitHub never fires for the run tag-release.yml starts with GITHUB_TOKEN. The +# template's ADR-0150 and ADR-0151 say why; it changes nothing until the project sets the baseline once (ADR-0147). # -# Needs Settings > Actions > General > Workflow permissions > "Allow GitHub Actions to create and approve pull -# requests", which tools/Set-RepositoryBaseline.ps1 in the project template turns on for a repository with this file. # The checkout keeps no credential; the branch check and the push get the token for that one command. The template # owns this file. name: Raise the package validation baseline @@ -31,7 +31,7 @@ permissions: {} jobs: raise: - name: Open the baseline pull request + name: Push the baseline branch and open its issue runs-on: ubuntu-latest timeout-minutes: 45 # One raise at a time; a second waits, so two releases never race to one branch. @@ -41,10 +41,8 @@ jobs: permissions: # To push the branch. contents: write - # To open the pull request. - pull-requests: write - # To start CI on the branch. - actions: write + # To open the issue. + issues: write steps: # The tag reaches the script through env, and only after it is known to be a version, so it can't inject anything. - name: Read the tag @@ -70,7 +68,7 @@ jobs: run: | $set = ./build/Update-Baseline.ps1 -Version $env:VERSION "set=$(([bool]$set).ToString().ToLowerInvariant())" >> $env:GITHUB_OUTPUT - - name: Open the pull request and start CI + - name: Open the issue with the pull request's link if: steps.baseline.outputs.set == 'true' shell: pwsh env: @@ -78,12 +76,13 @@ jobs: GH_REPO: ${{ github.repository }} VERSION: ${{ steps.tag.outputs.version }} DEFAULT_BRANCH: ${{ github.event.repository.default_branch }} + GITHUB_SERVER_URL: ${{ github.server_url }} run: | $branch = "baseline-$env:VERSION" $auth = [Convert]::ToBase64String([Text.Encoding]::UTF8.GetBytes("x-access-token:$env:GH_TOKEN")) git -c "http.https://github.com/.extraheader=AUTHORIZATION: basic $auth" ls-remote --exit-code --heads origin $branch *> $null - if ($LASTEXITCODE -eq 0) { "$branch already exists; nothing to open." >> $env:GITHUB_STEP_SUMMARY; exit 0 } - if ($LASTEXITCODE -ne 2) { throw "git ls-remote failed with exit code $LASTEXITCODE." } + $exists = $LASTEXITCODE -eq 0 + if (-not $exists -and $LASTEXITCODE -ne 2) { throw "git ls-remote failed with exit code $LASTEXITCODE." } git config user.name 'github-actions[bot]' if ($LASTEXITCODE) { throw "git config user.name failed with exit code $LASTEXITCODE." } git config user.email '41898282+github-actions[bot]@users.noreply.github.com' @@ -94,14 +93,29 @@ jobs: if ($LASTEXITCODE) { throw "git ls-files failed with exit code $LASTEXITCODE." } $edited = @(git ls-files --modified -- '*CompatibilitySuppressions.xml' | Where-Object { $_ -notin $deleted }) if ($LASTEXITCODE) { throw "git ls-files failed with exit code $LASTEXITCODE." } - git commit -am "Raise the package validation baseline to $env:VERSION" - if ($LASTEXITCODE) { throw "git commit failed with exit code $LASTEXITCODE." } - git -c "http.https://github.com/.extraheader=AUTHORIZATION: basic $auth" push origin $branch - if ($LASTEXITCODE) { throw "git push failed with exit code $LASTEXITCODE." } - $body = 'Raises `PackageValidationBaselineVersion` to {0}, which nuget.org now lists, so each pack is validated against the newest release (the template''s ADR-0150). Opened by `.github/workflows/raise-baseline.yml`, which started CI on this branch; mark it ready for review once CI passes.' -f $env:VERSION + # A rerun after the push, such as one that failed at the issue, pushes nothing and goes on to the issue. + if (-not $exists) { + git commit -am "Raise the package validation baseline to $env:VERSION" + if ($LASTEXITCODE) { throw "git commit failed with exit code $LASTEXITCODE." } + git -c "http.https://github.com/.extraheader=AUTHORIZATION: basic $auth" push origin $branch + if ($LASTEXITCODE) { throw "git push failed with exit code $LASTEXITCODE." } + } + $body = 'Raises `PackageValidationBaselineVersion` to {0}, which nuget.org now lists, so each pack is validated against the newest release (the template''s ADR-0150). Pushed by `.github/workflows/raise-baseline.yml`.' -f $env:VERSION if ($deleted.Count) { $body += "`n`n" + ('Deletes {0}: the baseline reached a new major version, and its suppressions all compared with the previous one, which package validation would now reject as unnecessary.' -f (($deleted | ForEach-Object { '`' + $_ + '`' }) -join ', ')) } if ($edited.Count) { $body += "`n`n" + ('Removes the suppressions that compared with the previous major version from {0}, keeping the others.' -f (($edited | ForEach-Object { '`' + $_ + '`' }) -join ', ')) } - gh pr create --base $env:DEFAULT_BRANCH --head $branch --draft --title "Raise the package validation baseline to $env:VERSION" --body $body - if ($LASTEXITCODE) { throw "gh pr create failed with exit code $LASTEXITCODE." } - gh workflow run ci.yml --ref $branch - if ($LASTEXITCODE) { throw "Couldn't start ci.yml on ${branch} (exit code $LASTEXITCODE): its on: section needs workflow_dispatch, as the template's ci.yml has. Start CI on the pull request by hand." } + $title = "Raise the package validation baseline to $env:VERSION" + # The branch's open issue, from an earlier run that stopped before its link was written, or a new one. gh prints + # the new issue's URL last. + $issueTitle = "Open the pull request that raises the package validation baseline to $env:VERSION" + $open = @(gh issue list --state open --search "in:title $issueTitle" --json 'number,title' | ConvertFrom-Json | Where-Object title -eq $issueTitle) + if ($LASTEXITCODE) { throw "gh issue list failed with exit code $LASTEXITCODE." } + if ($open.Count) { $number = $open[0].number } + else { + $url = @(gh issue create --title $issueTitle --body "``$branch`` raises ``PackageValidationBaselineVersion`` to $env:VERSION. Its pull request link follows.")[-1] + if ($LASTEXITCODE) { throw "gh issue create failed with exit code $LASTEXITCODE." } + $number = $url.Split('/')[-1] + } + $link = "$env:GITHUB_SERVER_URL/$env:GH_REPO/compare/$env:DEFAULT_BRANCH...${branch}?quick_pull=1&title=$([uri]::EscapeDataString($title))&body=$([uri]::EscapeDataString("$body`n`nCloses #$number"))" + gh issue edit $number --body "``$branch`` raises ``PackageValidationBaselineVersion`` to $env:VERSION, which nuget.org now lists. [Open its pull request]($link): opening it starts CI and NCode Review's review, and merging it closes this issue (the template's ADR-0150 and ADR-0036)." + if ($LASTEXITCODE) { throw "gh issue edit failed with exit code $LASTEXITCODE." } + "Issue #$number links the pull request from $branch." >> $env:GITHUB_STEP_SUMMARY diff --git a/template/.template/Update-Project.ps1 b/template/.template/Update-Project.ps1 index d114b1da..e0aeac3d 100644 --- a/template/.template/Update-Project.ps1 +++ b/template/.template/Update-Project.ps1 @@ -95,7 +95,7 @@ in .github/workflows runs on a release event or uploads release assets, whose releases the template's tools/Set-RepositoryBaseline.ps1 leaves mutable, it says to delete or leave out that paragraph, also when the project is already up to date (the template's ADR-0028). - With NCode Review, when .github/workflows/code-review.yml pins NCodeGroup/code-review before v1.4.0 or passes no approve: true, or AGENTS.md's Landing section doesn't say draft: yes, it says what to change and to run the template's tools/Set-RepositoryBaseline.ps1 again, also when the project is already up to date (the template's ADR-0022). + With NCode Review, when .github/workflows/code-review.yml pins NCodeGroup/code-review before v1.5.0, passes no approve: true or passes approve: true without approver-private-key, or AGENTS.md's Landing section doesn't say draft: yes, it says what to change, to store the approver's key with tools/Enable-CodeReview.ps1 -ApproverPrivateKeyPath from NCodeGroup/code-review and to run the template's tools/Set-RepositoryBaseline.ps1 again, also when the project is already up to date (the template's ADR-0022 and ADR-0036). On Windows it stops before it changes anything when the project's template version has a path Git for Windows refuses to check out, such as the uses_node file names of v0.69.0 to v0.75.0, because the update starts with @@ -319,8 +319,9 @@ function Get-CiPermissionNote { ".github/workflows/ci.yml asks for more than contents: read: $($findings -join '; '). .github/workflows/tag-release.yml runs ci.yml as a reusable workflow before it tags a release and grants it only contents: read, and GitHub fails that run as it starts when a job of ci.yml asks for more, whatever the job's if: says, so no release is tagged or published. Move each such job into a workflow of its own, such as .github/workflows/coverage.yml, and keep ci.yml's top-level permissions at contents: read (the template's ADR-0026, in docs/decisions/project-template/)." } -# NCode Review approves a clean pull request only with approve: true, which NCodeGroup/code-review v1.4.0 and later take, -# and code-review.yml and AGENTS.md are project-owned, so the update can only say what they still lack (the template's ADR-0022). +# NCode Review approves a clean pull request only with approve: true, and from NCodeGroup/code-review v1.5.0 on submits the +# approval as the NCode Review Approver, which meets a required approval, when approver-private-key is passed; code-review.yml +# and AGENTS.md are project-owned, so the update can only say what they still lack (the template's ADR-0022 and ADR-0036). function Get-CodeReviewNote { $workflow = '.github/workflows/code-review.yml' if (-not (Test-Path -LiteralPath $workflow -PathType Leaf)) { return } @@ -332,9 +333,10 @@ function Get-CodeReviewNote { $findings = [Collections.Generic.List[string]]::new() if ($versions.Count) { $lowest = @($versions | Sort-Object)[0] - if ($lowest -lt [version]'1.4.0') { $findings.Add(".github/workflows/code-review.yml pins NCodeGroup/code-review v$lowest") } + if ($lowest -lt [version]'1.5.0') { $findings.Add(".github/workflows/code-review.yml pins NCodeGroup/code-review v$lowest") } } if ($text -notmatch '(?m)^\s+approve:\s*[''"]?true[''"]?\s*(?:#.*)?$') { $findings.Add('.github/workflows/code-review.yml passes no approve: true') } + elseif ($text -notmatch '(?m)^\s+approver-private-key:\s*\S') { $findings.Add('.github/workflows/code-review.yml has no approver-private-key input') } if (Test-Path -LiteralPath AGENTS.md) { $draft = $null $inLanding = $false @@ -347,7 +349,7 @@ function Get-CodeReviewNote { } if (-not $findings.Count) { return } '' - "NCode Review approves a clean pull request only with approve: true, which NCodeGroup/code-review v1.4.0 and later take, and the template's tools/Set-RepositoryBaseline.ps1 then requires one approval once a second person has write access, from someone with write access other than the author, since GitHub counts none from NCode Review (the template's ADR-0022 and ADR-0034, in docs/decisions/project-template/): $($findings -join '; '). Pin v1.4.0 or later and pass approve: true in .github/workflows/code-review.yml, as the template's code-review.yml does, set - draft: yes in AGENTS.md's Landing section, so a pull request opens as a draft and marking it ready is the maintainer's review, then run the template's tools/Set-RepositoryBaseline.ps1 again, so the default branch dismisses stale approvals and, once a second person has write access, requires one approval, of the last push; with one writer it requires none, since GitHub counts no approval from the author or from NCode Review." + "NCode Review approves a clean pull request only with approve: true, and from NCodeGroup/code-review v1.5.0 on, given approver-private-key, submits the approval as the NCode Review Approver, an app that can write, so the approval meets a required approval (the template's ADR-0022, ADR-0034 and ADR-0036, in docs/decisions/project-template/): $($findings -join '; '). Pin v1.5.0 or later and pass approve: true and approver-private-key: `${{ secrets.NCODE_REVIEW_APPROVER_PRIVATE_KEY }} in the review job of .github/workflows/code-review.yml, as the template's code-review.yml does, store the approver's key in the code-review environment with tools/Enable-CodeReview.ps1 -ApproverPrivateKeyPath from NCodeGroup/code-review, set - draft: yes in AGENTS.md's Landing section, so a pull request opens as a draft and marking it ready is the maintainer's review, then run the template's tools/Set-RepositoryBaseline.ps1 again, so the default branch dismisses stale approvals and requires one approval, of the last push, where the approver is set up or a second person has write access." } # Nerdbank.GitVersioning, which version.json turns on (the template's ADR-0138), fails a build on a shallow clone and ignores -p:Version: name each job of the project's own workflows, other than publish.yml, which has its own check, that builds, packs, tests without --no-build or pushes packages with a shallow actions/checkout or a -p:Version argument. diff --git a/template/docs/api-compatibility.md.jinja b/template/docs/api-compatibility.md.jinja index 919f4151..84062563 100644 --- a/template/docs/api-compatibility.md.jinja +++ b/template/docs/api-compatibility.md.jinja @@ -23,7 +23,7 @@ Run `./build/Update-PublicApi.ps1` and review the `PublicAPI.Unshipped.txt` diff ## Releasing and the baseline -The release change runs `./build/Update-PublicApi.ps1 -Release` and sets `version.json`. The project sets `` once, to the last version on nuget.org, in `Directory.Build.props` after the import or in the packable project's `.csproj`; `.\.template\Update-Project.ps1` and the template's `Adopt-Project.ps1` name that version. From then on `./build/Update-Baseline.ps1 -Version ` raises it once nuget.org lists a release{% if not publisher %}, and on GitHub `.github/workflows/raise-baseline.yml` runs it after each release and opens the pull request to merge{% endif %}.{% if git_host == 'gitlab' %} On GitLab, the `raise-baseline` job of `.gitlab-ci.yml` runs it when a stable version tag is pushed and opens a draft merge request. It needs a protected, masked CI/CD variable `BASELINE_TOKEN`, a project access token with the Developer role and the `api` and `write_repository` scopes, and protected `v*` tags, so that tag pipelines can read the variable, and is skipped without the variable, in which case run the script by hand. `tools/Set-GitLabBaseline.ps1 -BaselineToken` in the project template creates the token and the variable and protects the `v*` tags.{% endif %} A baseline one release behind still compares against a real release and only misses the breaks since then, so a late raise is safe too. +The release change runs `./build/Update-PublicApi.ps1 -Release` and sets `version.json`. The project sets `` once, to the last version on nuget.org, in `Directory.Build.props` after the import or in the packable project's `.csproj`; `.\.template\Update-Project.ps1` and the template's `Adopt-Project.ps1` name that version. From then on `./build/Update-Baseline.ps1 -Version ` raises it once nuget.org lists a release{% if not publisher %}, and on GitHub `.github/workflows/raise-baseline.yml` runs it after each release, pushes its branch and opens an issue whose link opens the pull request to merge{% endif %}.{% if git_host == 'gitlab' %} On GitLab, the `raise-baseline` job of `.gitlab-ci.yml` runs it when a stable version tag is pushed and opens a draft merge request. It needs a protected, masked CI/CD variable `BASELINE_TOKEN`, a project access token with the Developer role and the `api` and `write_repository` scopes, and protected `v*` tags, so that tag pipelines can read the variable, and is skipped without the variable, in which case run the script by hand. `tools/Set-GitLabBaseline.ps1 -BaselineToken` in the project template creates the token and the variable and protects the `v*` tags.{% endif %} A baseline one release behind still compares against a real release and only misses the breaks since then, so a late raise is safe too. ## An intended break diff --git a/template/docs/decisions/project-template/0022-ncode-reviews-approval-gates-the-merge.md.jinja b/template/docs/decisions/project-template/0022-ncode-reviews-approval-gates-the-merge.md.jinja index 238f1035..5bb52e96 100644 --- a/template/docs/decisions/project-template/0022-ncode-reviews-approval-gates-the-merge.md.jinja +++ b/template/docs/decisions/project-template/0022-ncode-reviews-approval-gates-the-merge.md.jinja @@ -1,6 +1,6 @@ # 0022. Where NCode Review approves, the ruleset requires an approval and pull requests open as drafts -- **Status:** Accepted (amended by 0031{% if git_host == 'github' %} and 0034{% endif %}) +- **Status:** Accepted (amended by 0031{% if git_host == 'github' %}, 0034 and 0036{% endif %}) - **Date:** 2026-11-15 - **Amends:** 0005, 0006, 0019{% if git_host == 'github' %}, 0020{% endif %}{% if git_host == 'github' and stack == 'dotnet' and (nuget_package | default(false)) %}, 0150{% endif %} diff --git a/template/docs/decisions/project-template/0034-with-one-writer-the-baseline-requires-no-approval.md b/template/docs/decisions/project-template/0034-with-one-writer-the-baseline-requires-no-approval.md index 9a792aeb..a354937f 100644 --- a/template/docs/decisions/project-template/0034-with-one-writer-the-baseline-requires-no-approval.md +++ b/template/docs/decisions/project-template/0034-with-one-writer-the-baseline-requires-no-approval.md @@ -1,6 +1,6 @@ # 0034. With one writer, the baseline requires no approval -- **Status:** Accepted +- **Status:** Accepted (amended by 0036) - **Date:** 2026-11-20 - **Amends:** 0005, 0006, 0019, 0020, 0022, 0031 and, where a project has it, 0150 diff --git a/template/docs/decisions/project-template/0036-a-required-approval-is-met-by-ncode-reviews-approver-app.md b/template/docs/decisions/project-template/0036-a-required-approval-is-met-by-ncode-reviews-approver-app.md new file mode 100644 index 00000000..a9ba7248 --- /dev/null +++ b/template/docs/decisions/project-template/0036-a-required-approval-is-met-by-ncode-reviews-approver-app.md @@ -0,0 +1,72 @@ +# 0036. A required approval is met by NCode Review's approver app + +- **Status:** Accepted +- **Date:** 2026-11-21 +- **Amends:** 0022, 0034 and, where a project has it, 0150 + +## Context + +[ADR-0034](0034-with-one-writer-the-baseline-requires-no-approval.md) holds that NCode Review's approval can't count +toward a required approval, because its app has no write access and every one of its reviews has `author_association` +`NONE`. + +#460 measured what GitHub counts: + +- An approval counts toward a ruleset's required approval when its reviewer can write to the repository + (`authorCanPushToRepository`). It counts also when the token that submitted it can only write pull requests. + GitHub checks the reviewer's write access when it reads the review. +- `author_association` is `NONE` for an app's review either way, so it says nothing about whether the approval counts. +- Any workflow with `pull-requests: write` approves its own pull request while the setting "Allow GitHub Actions to + create and approve pull requests" is on, so a required approval is a gate only while no writer's workflow can + approve. + +NCodeGroup/code-review#232 adds the NCode Review Approver, an app with Contents: write whose token, minted after the +review, can only write pull requests. + +## Decision + +1. NCode Review approves as the NCode Review Approver (NCodeGroup/code-review#232, its ADR-1011). The app is installed + on the repositories that approve, with Contents: write and Pull requests: write. Its token is minted after the review + with Pull requests: write only. Its key is a secret of the `code-review` environment, which only the default branch + can deploy to. +2. Where the approver is set up, the baseline requires one approval, of the last push, with one writer too. The approver + is set up when the default branch's `.github/workflows/code-review.yml` passes `approve: true` and a non-empty + `approver-private-key:`, and the repository's `code-review` environment has the secret + `NCODE_REVIEW_APPROVER_PRIVATE_KEY`. A run checks both, since requiring an approval that nobody can give blocks every + merge, and names the fix when the secret is missing. Elsewhere ADR-0034 holds: no approval with one writer, one + approval with two or more. This amends ADR-0034's decisions 2, 6 and 8 and ADR-0022's decision 2. +3. Every repository and the organization's defaults keep GitHub Actions from approving pull requests and give the + workflow token read-only access (#461). `tools/Set-RepositoryBaseline.ps1` sets the repository's, and its + `-OrganizationPolicy` sets the organization's, whether or not the repository has `raise-baseline.yml`. +4. `raise-baseline.yml` pushes `baseline-` and opens an issue whose link opens the pull request, with its + title, description and `Closes #` filled in. It opens no pull request itself, so it needs neither the setting + nor a key, and a pull request a person opens starts CI and NCode Review's review. Where a project has record 0150, + this amends its decision on the setting and its consequence that a workflow token's approval counts. +5. A maintainer approves a bot's pull request, which NCode Review skips. + +## Options considered + +- Give NCode Review's own app write access. Rejected: that app is installed wherever NCode Review runs, and write + access lets it push to every one of those repositories. +- Approve with `GITHUB_TOKEN`. Rejected: the setting that allows it lets any writer's workflow approve its own pull + request. +- Keep requiring no approval with one writer. Rejected: the approval can count, so the ruleset can ask for it. +- A dedicated approver app, installed only where approval is wanted (chosen). + +## Consequences + +- An NCode Review outage or budget stop blocks merges where the approval is required, until it is fixed or the ruleset + changes. This amends the consequences of ADR-0019 and ADR-0022. +- A leaked approver key can mint a Contents: write token for the repositories the approver is installed on. +- The baseline pull request needs a person to open it from the issue's link. +- A project's pin reaches NCode Review v1.5.0 before the action knows `approver-private-key`; until then it warns that + it doesn't know the input and goes on. + +## References + +- `tools/Set-RepositoryBaseline.ps1`, `template/.github/workflows/code-review.yml` and + `template/.github/workflows/raise-baseline.yml` in the project template's repository +- [ADR-0019](0019-nothing-requires-the-code-review-check-the-person-who-merges-waits-for-it.md), + [ADR-0022](0022-ncode-reviews-approval-gates-the-merge.md), + and [ADR-0034](0034-with-one-writer-the-baseline-requires-no-approval.md) +- NCodeGroup/project-template#460 and #461, NCodeGroup/code-review#232 diff --git a/template/docs/decisions/project-template/0150-a-workflow-raises-the-package-validation-baseline-after-each-release.md.jinja b/template/docs/decisions/project-template/0150-a-workflow-raises-the-package-validation-baseline-after-each-release.md.jinja index d41e3363..c480b9dd 100644 --- a/template/docs/decisions/project-template/0150-a-workflow-raises-the-package-validation-baseline-after-each-release.md.jinja +++ b/template/docs/decisions/project-template/0150-a-workflow-raises-the-package-validation-baseline-after-each-release.md.jinja @@ -1,6 +1,6 @@ # 0150. A workflow raises the package validation baseline after each release -- **Status:** Accepted{% if git_host == 'github' %} (amended by 0022, 0034 and 0151){% endif %} +- **Status:** Accepted{% if git_host == 'github' %} (amended by 0022, 0034, 0036 and 0151){% endif %} - **Date:** 2026-11-15 - **Amends:** 0147 diff --git a/template/docs/decisions/project-template/README.md.jinja b/template/docs/decisions/project-template/README.md.jinja index 91315ef9..ab466afa 100644 --- a/template/docs/decisions/project-template/README.md.jinja +++ b/template/docs/decisions/project-template/README.md.jinja @@ -38,7 +38,7 @@ never brings a number the project already uses | [0020](0020-github-projects-are-scored-by-openssf-scorecard.md) | A GitHub project runs the OpenSSF Scorecard workflow; the record lists what the template controls and what needs a person | {%- endif %} | [0021](0021-tooling-is-written-in-nodejs-then-go-then-powershell.md) | Tooling is written in Node.js first, then Go, then PowerShell 7; Python is left out of the toolchain, except for Python programs such as Copier | -| [0022](0022-ncode-reviews-approval-gates-the-merge.md) | Where `code-review.yml` passes NCode Review's `approve: true`, the ruleset requires one approval and approval of the last push, never the latter alone, and a new such project opens every pull request as a draft (amends 0005, 0006, 0019{% if git_host == 'github' %} and 0020{% endif %}; amended by 0031{% if git_host == 'github' %} and 0034{% endif %}) | +| [0022](0022-ncode-reviews-approval-gates-the-merge.md) | Where `code-review.yml` passes NCode Review's `approve: true`, the ruleset requires one approval and approval of the last push, never the latter alone, and a new such project opens every pull request as a draft (amends 0005, 0006, 0019{% if git_host == 'github' %} and 0020{% endif %}; amended by 0031{% if git_host == 'github' %}, 0034 and 0036{% endif %}) | | [0023](0023-a-project-ships-the-documents-the-best-practices-silver-level-asks-for.md) | Every project ships the governance, conduct, roadmap, architecture and assurance documents the OpenSSF Best Practices silver level asks for, with a map from each criterion to its evidence | | [0024](0024-a-project-is-licensed-under-apache-2-0-unless-it-answers-otherwise.md) | A project's `license` answer defaults to Apache-2.0; an update or an adoption never chooses a license for existing code, and both warn when the repository has none | | [0025](0025-every-best-practices-criterion-is-mapped-in-a-template-owned-page.md) | Every OpenSSF Best Practices criterion of the passing, silver and gold levels is mapped to the answer to expect and its evidence in the template-owned `docs/best-practices-criteria.md`, which a test checks against the badge's own list (amends 0023{% if git_host == 'github' %} and 0020{% endif %}) | @@ -58,8 +58,9 @@ never brings a number the project already uses | [0032](0032-a-plan-is-released-only-when-it-changes-what-a-release-ships.md) | A plan gets a `Release:` line, and its merge a tag and a release, only when it changes what a release ships: the product's code, a file its package carries or its build output; site pages, CI, decision records, tests and repository docs wait under `## [Unreleased]` (amends 0016) | | [0033](0033-an-all-in-run-lifts-the-autopilots-limits-on-the-maintainers-word.md) | `/run-issues-all-in` takes every issue into one pull request with no question and no caps, fixes every follow-up and finding there, protected paths included for issues it names, and ends at the merge recommendation (amends 0014) | {%- if git_host == 'github' %} -| [0034](0034-with-one-writer-the-baseline-requires-no-approval.md) | Where one person has write access, the repository baseline requires no approval and no approval of the last push, even where NCode Review approves, since GitHub counts neither the author's approval nor NCode Review's; NCode Review keeps approving and gets no write access (amends 0005, 0006, 0019, 0020, 0022 and 0031) | +| [0034](0034-with-one-writer-the-baseline-requires-no-approval.md) | Where one person has write access, the repository baseline requires no approval and no approval of the last push, even where NCode Review approves, since GitHub counts neither the author's approval nor NCode Review's; NCode Review keeps approving and gets no write access (amends 0005, 0006, 0019, 0020, 0022 and 0031; amended by 0036) | | [0035](0035-a-sole-maintainer-dismisses-the-scorecard-alerts-one-person-cannot-clear.md) | With one writer, the Scorecard alerts of Branch-Protection, CII-Best-Practices and Contributors are dismissed as won't fix with a standard comment, through the project template's tools/Dismiss-ScorecardAlerts.ps1, and /best-practices reports a dismissed alert as accepted (amends 0020 and 0153) | +| [0036](0036-a-required-approval-is-met-by-ncode-reviews-approver-app.md) | Where NCode Review's approver app is set up, the baseline requires one approval, of the last push, whatever the number of writers, since GitHub counts an approval from a reviewer that can write; Actions never approve pull requests, and the baseline pull request is opened from an issue's link (amends 0022, 0034 and, where a project has it, 0150) | {%- endif %} {%- if stack == 'dotnet' %} diff --git a/tests/Test-RepositoryBaseline.ps1 b/tests/Test-RepositoryBaseline.ps1 index 72ab5914..6d1dbc54 100644 --- a/tests/Test-RepositoryBaseline.ps1 +++ b/tests/Test-RepositoryBaseline.ps1 @@ -28,6 +28,9 @@ not written but gets a notice with the command (with one writer only), a refusal gets the same notice, a list it can't read or that is not JSON is named, an empty list or one with a bot counts as one writer, and a public one gets a notice naming tools/Dismiss-ScorecardAlerts.ps1; + that where NCode Review's approver is set up (the input and the code-review environment's secret), the ruleset requires one + approval, of the last push, with one writer too, an earlier one is raised, and a missing or unreadable secret is named and + requires none; that -RequireChecks auto requires the GitHub Actions checks that passed on the latest merged pull request, found on any page of closed pull requests, reading every page of its check runs and workflow runs, Commit attribution among them, leaves out the review bot's Code review and its job, CodeQL and its @@ -37,8 +40,8 @@ repository it doesn't skip, one whose default branch it leaves alone too, gets a "Protect release tags" ruleset on v* tags with no deletion, no update and no bypass, which -WhatIf shows, unless it has one of that name, whatever its state, or an active tag ruleset that refuses both already; that it turns on, in order, the read-only workflow token - with Actions not approving pull requests (or opening the baseline pull request, where the default branch has - raise-baseline.yml), secret scanning, its push protection, Dependabot alerts, Dependabot + with Actions not approving pull requests, whether or not the default branch has raise-baseline.yml (ADR-0036), + secret scanning, its push protection, Dependabot alerts, Dependabot security updates and private vulnerability reporting, each with the call and body the API takes, and only where it is off, reports each as set, already set, would set or not available, leaves secret scanning out of a repository that isn't public, and reports a setting the API won't read or refuses without failing the run; that it allows @@ -52,7 +55,9 @@ both files, says why, also with -WhatIf and when refused, and is left alone when it does its job; that a file or policy it can't read, or a refusal, is reported without failing the run, and an organization read that fails other than with HTTP 403 or 404 is named in the policy's line; that - -OrganizationPolicy posts the same policy, on every repository, to the organization alone, prints its body with + -OrganizationPolicy also sets the organization's default workflow token to read-only with Actions not approving pull + requests where it is off, leaves it where it is set, shows it with -WhatIf and exits 1 when that is refused while + still creating the policy; it posts the same policy, on every repository, to the organization alone, prints its body with -WhatIf, updates one of that name in place, keeping its other events, when it isn't active, misses an event or doesn't cover both files on every repository, says why, also with -WhatIf and when refused, and leaves alone one that does or one that already allows both events on every repository, exits 1 when it can't read the @@ -138,7 +143,7 @@ if ($method -ne 'GET') { } if ($key -eq 'code-scanning/default-setup' -and $repo.switchFails) { exit 1 } $org = if ($path -match '^orgs/([^/]+)/') { $data.orgs[$Matches[1]] } - $refused = if ($repo -and $repo.writeFails) { $repo.writeFails[$key] } elseif ($org) { $org.writeFail } + $refused = if ($repo -and $repo.writeFails) { $repo.writeFails[$key] } elseif ($org -and $path -like '*/actions/permissions/workflow') { $org.workflowWriteFail } elseif ($org) { $org.writeFail } $message = if ($org.message) { $org.message } else { "Stand-in refused $key" } if ($refused) { Out-Answer ([int]$refused) (ConvertTo-Json -Compress -InputObject @{ message = $message }) } if ($rest -contains '--input') { Out-Answer 200 '{}' } else { Out-Answer 204 '' } @@ -157,6 +162,15 @@ if ($path -match '^repos/[^/]+/([^/]+)/(actions/permissions/workflow|vulnerabili default { Out-Answer 200 (ConvertTo-Json -Compress -InputObject @{ enabled = $on }) } } } +# An organization's default workflow token: workflow is on (read-only, Actions not approving; the default), write (a +# write token), readApproves (read-only, but Actions may approve pull requests) or fail:; one not in orgs is 404. +if ($path -match '^orgs/([^/]+)/actions/permissions/workflow$') { + $org = $data.orgs[$Matches[1]] + if (-not $org) { Out-Answer 404 '{"message":"Not Found"}' } + $state = if ($org.workflow) { "$($org.workflow)" } else { 'on' } + if ($state.StartsWith('fail:')) { Out-Answer ([int]$state.Substring(5)) '{"message":"Stand-in refused to read it"}' } + Out-Answer 200 (ConvertTo-Json -Compress -InputObject @{ default_workflow_permissions = if ($state -eq 'write') { 'write' } else { 'read' }; can_approve_pull_request_reviews = $state -ne 'on' }) +} # A file on the default branch: 200 when the repository's workflows list names it, 404 when it doesn't, or, for a # list of fail:, that status for every file. A file with text in workflowText comes as base64 with line breaks, as # GitHub sends it. A file workflowText maps to $null comes without content, as a file over 1 MB does, and any other file as on: pull_request_target. @@ -216,6 +230,13 @@ if ($path -match '^repos/[^/]+/([^/]+)/collaborators\?') { if ($writers -is [string] -and $writers -eq 'notjson') { Out-Answer 200 'not json' } Out-Answer 200 (ConvertTo-Json -Compress -InputObject @(@($writers | Where-Object { $_ }) | ForEach-Object { if ($_.StartsWith('bot:')) { @{ login = $_.Substring(4); type = 'Bot'; role_name = 'write' } } else { @{ login = $_; type = 'User'; role_name = 'write' } } })) } +# The approver's secret in the code-review environment: approverSecret is present (200), missing (404) or fail:. +if ($path -match '^repos/[^/]+/([^/]+)/environments/code-review/secrets/NCODE_REVIEW_APPROVER_PRIVATE_KEY$') { + $state = "$($data.repos[$Matches[1]].approverSecret)" + if ($state -eq 'present') { Out-Answer 200 '{"name":"NCODE_REVIEW_APPROVER_PRIVATE_KEY"}' } + if ($state.StartsWith('fail:')) { Out-Answer ([int]$state.Substring(5)) '{"message":"Stand-in refused to read it"}' } + Out-Answer 404 '{"message":"Not Found"}' +} if ($path -match '^repos/[^/]+/([^/]+)/rulesets/(\d+)$') { ConvertTo-Json -InputObject $data.repos[$Matches[1]].full["$($Matches[2])"] -Depth 10; exit 0 } if ($path -match '^repos/[^/]+/([^/]+)/rulesets$') { ConvertTo-Json -InputObject @($data.repos[$Matches[1]].rulesets) -Depth 5; exit 0 } # Pull requests, and the check runs and workflow runs of a commit, for -RequireChecks auto. @@ -272,9 +293,10 @@ function New-EventPolicy([string]$Name, [string[]]$Events = @('pull_request_targ # (New-EventPolicy), or fail:. $WorkflowText maps a workflow file to its text, which the contents API answers as base64. # $Languages lists the languages CodeQL's default setup analyzes, those of NCodeGroup/Buffers unless it says otherwise: # @() for none, and $null leaves languages out of the answer. -# $Writers lists the logins with write access, two unless it says otherwise, or fail:. +# $Writers lists the logins with write access, two unless it says otherwise, or fail:. $ApproverSecret is the state of +# the code-review environment's NCODE_REVIEW_APPROVER_PRIVATE_KEY: present, missing or fail:. function New-Repo([string]$Branch = 'main', [bool]$Archived = $false, [bool]$Fork = $false, $Rulesets = @(), [string]$CodeQL = 'configured', [string]$Suite = 'default', $Languages = @('actions', 'csharp'), [bool]$SwitchFails = $false, $Pulls = @(), [hashtable]$CheckRuns = @{}, [hashtable]$WorkflowRuns = @{}, - [string]$Visibility = 'public', [string]$SecretScanning = 'disabled', [string]$PushProtection = 'disabled', [hashtable]$Security = @{}, [hashtable]$WriteFails = @{}, $AutoMerge = $false, [string[]]$Workflows = @(), [hashtable]$WorkflowText = @{}, $Policies = @(), [string]$OwnerType = '', $Writers = @('maintainer', 'collaborator')) { + [string]$Visibility = 'public', [string]$SecretScanning = 'disabled', [string]$PushProtection = 'disabled', [hashtable]$Security = @{}, [hashtable]$WriteFails = @{}, $AutoMerge = $false, [string[]]$Workflows = @(), [hashtable]$WorkflowText = @{}, $Policies = @(), [string]$OwnerType = '', $Writers = @('maintainer', 'collaborator'), [string]$ApproverSecret = 'missing') { $full = @{} $summaries = @() $id = 100 @@ -290,7 +312,7 @@ function New-Repo([string]$Branch = 'main', [bool]$Archived = $false, [bool]$For rulesets = $summaries; full = $full; codeql = $CodeQL; suite = $Suite; languages = $Languages; switchFails = $SwitchFails pulls = @($Pulls); checkRuns = $CheckRuns; workflowRuns = $WorkflowRuns; security = $settings; writeFails = $WriteFails workflows = @($Workflows); workflowText = $WorkflowText; policies = if ($Policies -is [string]) { $Policies } else { @($Policies) } - writers = if ($Writers -is [string]) { $Writers } else { @($Writers) } } + writers = if ($Writers -is [string]) { $Writers } else { @($Writers) }; approverSecret = $ApproverSecret } } $allSecurityOn = @{ 'actions/permissions/workflow' = 'on'; 'vulnerability-alerts' = 'on'; 'automated-security-fixes' = 'on'; 'private-vulnerability-reporting' = 'on'; 'immutable-releases' = 'on' } function New-Pull([int]$Number, [string]$Sha, [string]$MergedAt) { @{ number = $Number; head = @{ sha = $Sha }; merged_at = if ($MergedAt) { $MergedAt } else { $null } } } @@ -338,6 +360,7 @@ $bareRuleset.rules[2].Remove('parameters') $reviewWorkflows = @('.github/workflows/code-review.yml', '.github/workflows/code-review-auto-merge.yml') $dispatchYaml = "name: Code review`n`non:`n pull_request_target:`n types: [opened, reopened, ready_for_review, closed]`n issue_comment:`n types: [created]`n workflow_dispatch:`n`npermissions: {}`n`njobs:`n review:`n runs-on: ubuntu-latest`n" $approveYaml = "on:`n pull_request_target:`njobs:`n review:`n steps:`n - uses: NCodeGroup/code-review@x`n with:`n approve: true`n" +$approverYaml = $approveYaml + " approver-private-key: `${{ secrets.NCODE_REVIEW_APPROVER_PRIVATE_KEY }}`n" $repos = @{ fresh = New-Repo freshApprover = New-Repo -Workflows @('.github/workflows/code-review.yml') -WorkflowText @{ '.github/workflows/code-review.yml' = $approveYaml } @@ -406,6 +429,12 @@ $repos = @{ writersUnreadableOurs = New-Repo -Writers 'fail:403' -Rulesets @((New-Ruleset 'Protect main' -LastPush $true -Approvals 1)) solePrivate = New-Repo -Writers @('maintainer') -Visibility 'private' twoOwnedApproval = New-Repo -Rulesets @((New-Ruleset 'owner rules' -Approvals 1)) + # NCode Review's approver app is set up (ADR-0036): one writer, the input, and the secret, missing or unreadable. + approverWritersUnreadable = New-Repo -Writers 'fail:403' -ApproverSecret 'present' -Workflows @('.github/workflows/code-review.yml') -WorkflowText @{ '.github/workflows/code-review.yml' = $approverYaml } + approverSole = New-Repo -Writers @('maintainer') -ApproverSecret 'present' -Workflows @('.github/workflows/code-review.yml') -WorkflowText @{ '.github/workflows/code-review.yml' = $approverYaml } + approverSoleOurs = New-Repo -Writers @('maintainer') -ApproverSecret 'present' -Workflows @('.github/workflows/code-review.yml') -WorkflowText @{ '.github/workflows/code-review.yml' = $approverYaml } -Rulesets @((New-Ruleset 'Protect main')) + approverNoSecret = New-Repo -Writers @('maintainer') -Workflows @('.github/workflows/code-review.yml') -WorkflowText @{ '.github/workflows/code-review.yml' = $approverYaml } + approverSecretFails = New-Repo -Writers @('maintainer') -ApproverSecret 'fail:500' -Workflows @('.github/workflows/code-review.yml') -WorkflowText @{ '.github/workflows/code-review.yml' = $approverYaml } writersNone = New-Repo -Writers @() -Workflows @('.github/workflows/code-review.yml') -WorkflowText @{ '.github/workflows/code-review.yml' = $approveYaml } soleWithBot = New-Repo -Writers @('maintainer', 'bot:release-app') -Workflows @('.github/workflows/code-review.yml') -WorkflowText @{ '.github/workflows/code-review.yml' = $approveYaml } writersNotJson = New-Repo -Writers 'notjson' -Workflows @('.github/workflows/code-review.yml') -WorkflowText @{ '.github/workflows/code-review.yml' = $approveYaml } @@ -442,7 +471,7 @@ $repos = @{ refused = New-Repo -WriteFails @{ 'actions/permissions/workflow' = 409; 'secret_scanning_push_protection' = 422; 'automated-security-fixes' = 422; 'allow_auto_merge' = 403 } workflowUnreadable = New-Repo -Security @{ 'actions/permissions/workflow' = 'fail:403' } baselineRaiser = New-Repo -Workflows @('.github/workflows/raise-baseline.yml') - baselineRaiserSet = New-Repo -Workflows @('.github/workflows/raise-baseline.yml') -Security @{ 'actions/permissions/workflow' = 'readApproves' } + baselineRaiserSet = New-Repo -Workflows @('.github/workflows/raise-baseline.yml') -Security @{ 'actions/permissions/workflow' = 'on' } provenance = New-Repo -Workflows @('.github/workflows/release-provenance.yml') # Workflows that run on a release event or upload release assets, one that only has a job named release, and one the # contents API sends without text. @@ -499,6 +528,10 @@ $orgs = @{ orgBroken = @{ policies = 'fail:500' } orgRefuses = @{ policies = @(); writeFail = 403 } orgPullOnly = @{ policies = @((New-EventPolicy 'pull only everywhere' -Paths @('.github/workflows/*') -Repos @('~ALL') -Events @('pull_request_target'))) } + orgTokenWrite = @{ policies = @(); workflow = 'write' } + orgTokenApproves = @{ policies = @(); workflow = 'readApproves' } + orgTokenRefused = @{ policies = @(); workflow = 'write'; workflowWriteFail = 403 } + orgTokenUnreadable = @{ policies = @(); workflow = 'fail:403' } orgFreeRead = @{ policies = 'fail:403'; message = 'Upgrade to GitHub Team to enable this feature.' } orgFreeWrite = @{ policies = @(); writeFail = 403; message = 'Upgrade to GitHub Team to enable this feature.' } orgTfaOn = @{ twoFactor = 'true' } @@ -804,6 +837,25 @@ try { Check 'writers: a ruleset of the owner''s that requires an approval is not written, and gets a notice with the command' (-not @($r.Bodies | Where-Object { $_.method -eq 'PUT' -and $_.path -like '*/rulesets/101' }).Count -and $r.Output.Contains("soleOwned: notice: 'owner rules' requires an approval while one person has write access") -and $r.Output.Contains('$p.required_approving_review_count = 0') -and $r.Output.Contains('gh api -X PUT repos/NCodeGroup/soleOwned/rulesets/101 --input -')) "$($r.Changes -join '|') $($r.Output)" $r = Invoke-Baseline @('-Repo', 'twoOwnedApproval') Check 'writers: with two writers a ruleset of the owner''s that requires an approval gets no notice' ($r.Output -notmatch 'requires an approval while one person') $r.Output + # 6e. NCode Review's approver app is set up: one approval, of the last push, with one writer too (ADR-0036). + $r = Invoke-Baseline @('-Repo', 'approverSole') + $ap = if ($r.Body) { ($r.Body.rules | Where-Object type -eq 'pull_request').parameters } else { $null } + Check 'approver: one writer, the input and the secret create the ruleset with one approval, of the last push' ($r.Body -and $ap.required_approving_review_count -eq 1 -and $ap.require_last_push_approval -eq $true -and $ap.dismiss_stale_reviews_on_push -eq $true -and $r.Output.Contains('approverSole: NCode Review approves as the NCode Review Approver') -and $r.Output -notmatch 'but one person has write access') "$($ap | ConvertTo-Json -Compress) $($r.Output)" + $r = Invoke-Baseline @('-Repo', 'approverWritersUnreadable') + $ap = if ($r.Body) { ($r.Body.rules | Where-Object type -eq 'pull_request').parameters } else { $null } + Check 'approver: a collaborators list it can''t read still gets one approval, of the last push, where the approver is set up' ($r.Body -and $ap.required_approving_review_count -eq 1 -and $ap.require_last_push_approval -eq $true -and $r.Output.Contains("approverWritersUnreadable: couldn't read who has write access (HTTP 403")) "$($ap | ConvertTo-Json -Compress) $($r.Output)" + $r = Invoke-Baseline @('-Repo', 'approverSoleOurs') + $puts = @($r.Bodies | Where-Object { $_.method -eq 'PUT' -and $_.path -eq 'repos/NCodeGroup/approverSoleOurs/rulesets/101' }) + $ap = if ($puts.Count) { ($puts[-1].body.rules | Where-Object type -eq 'pull_request').parameters } else { $null } + Check 'approver: an earlier Protect main that requires none is raised to one approval, of the last push' ($puts.Count -eq 1 -and $ap.required_approving_review_count -eq 1 -and $ap.require_last_push_approval -eq $true -and $r.Output -notmatch 'no approval and no approval') "$($r.Changes -join '|') $($r.Output)" + $r = Invoke-Baseline @('-Repo', 'approverNoSecret') + $ap = if ($r.Body) { ($r.Body.rules | Where-Object type -eq 'pull_request').parameters } else { $null } + Check 'approver: the input without the secret requires no approval, and names Enable-CodeReview.ps1' ($r.Body -and $ap.required_approving_review_count -eq 0 -and $ap.require_last_push_approval -eq $false -and $r.Output.Contains('approverNoSecret: code-review.yml passes approver-private-key, but its code-review environment has no NCODE_REVIEW_APPROVER_PRIVATE_KEY') -and $r.Output.Contains('Enable-CodeReview.ps1 -ApproverPrivateKeyPath')) "$($ap | ConvertTo-Json -Compress) $($r.Output)" + $r = Invoke-Baseline @('-Repo', 'approverSecretFails') + $ap = if ($r.Body) { ($r.Body.rules | Where-Object type -eq 'pull_request').parameters } else { $null } + Check 'approver: a secret read that fails is named, and the ruleset requires no approval' ($r.Body -and $ap.required_approving_review_count -eq 0 -and $r.Output.Contains('approverSecretFails: code-review.yml passes approver-private-key, but HTTP 500')) "$($ap | ConvertTo-Json -Compress) $($r.Output)" + $r = Invoke-Baseline @('-Repo', 'soleApprover') + Check 'approver: approve: true without the input keeps the one-writer behavior' ($r.Output.Contains('(the template''s ADR-0034 and ADR-0036)') -and $r.Output -notmatch 'NCode Review Approver') $r.Output $r = Invoke-Baseline @('-Repo', 'writersNone') $ap = if ($r.Body) { ($r.Body.rules | Where-Object type -eq 'pull_request').parameters } else { $null } Check 'writers: an empty collaborators list counts as one writer: no approval, even with approve: true' ($r.Body -and $ap.required_approving_review_count -eq 0 -and $ap.require_last_push_approval -eq $false -and $r.Output.Contains('writersNone: code-review.yml passes approve: true, but one person has write access')) "$($ap | ConvertTo-Json -Compress) $($r.Output)" @@ -1026,10 +1078,10 @@ try { $r = Invoke-Baseline @('-Repo', 'baselineRaiser') $workflow = @($r.Bodies | Where-Object { $_.path -eq 'repos/NCodeGroup/baselineRaiser/actions/permissions/workflow' }) - Check 'security: a repository with raise-baseline.yml lets Actions open pull requests, with a read-only token' ($workflow.Count -eq 1 -and $workflow[0].method -eq 'PUT' -and $workflow[0].body.default_workflow_permissions -eq 'read' -and $workflow[0].body.can_approve_pull_request_reviews -eq $true -and $r.Output -match [regex]::Escape('baselineRaiser: read-only workflow token, and Actions opening the baseline pull request: set')) "$($workflow | ConvertTo-Json -Depth 6 -Compress) $($r.Output)" + Check 'security: a repository with raise-baseline.yml keeps Actions from approving pull requests, with a read-only token' ($workflow.Count -eq 1 -and $workflow[0].method -eq 'PUT' -and $workflow[0].body.default_workflow_permissions -eq 'read' -and $workflow[0].body.can_approve_pull_request_reviews -eq $false -and $r.Output -match [regex]::Escape('baselineRaiser: read-only workflow token, and Actions not approving pull requests: set')) "$($workflow | ConvertTo-Json -Depth 6 -Compress) $($r.Output)" $r = Invoke-Baseline @('-Repo', 'baselineRaiserSet') - Check 'security: a repository with raise-baseline.yml whose Actions may open pull requests already changes nothing there' (@($r.Bodies | Where-Object { $_.path -match 'actions/permissions/workflow' }).Count -eq 0 -and $r.Output -match [regex]::Escape('baselineRaiserSet: read-only workflow token, and Actions opening the baseline pull request: already set')) "$($r.Changes -join '|') $($r.Output)" + Check 'security: a repository with raise-baseline.yml whose Actions may not approve pull requests already changes nothing there' (@($r.Bodies | Where-Object { $_.path -match 'actions/permissions/workflow' }).Count -eq 0 -and $r.Output -match [regex]::Escape('baselineRaiserSet: read-only workflow token, and Actions not approving pull requests: already set')) "$($r.Changes -join '|') $($r.Output)" $r = Invoke-Baseline @('-Repo', 'provenance') Check 'security: a repository with release-provenance.yml keeps mutable releases, and says why' (($r.Changes -join '|') -notmatch 'immutable-releases' -and $r.Output -match [regex]::Escape('provenance: immutable releases: not available (release-provenance.yml attaches packages')) "$($r.Changes -join '|') $($r.Output)" @@ -1245,6 +1297,20 @@ try { Check 'org: a refusal is reported and fails the run' ($r.ExitCode -eq 1 -and $r.Output -match [regex]::Escape("orgRefuses (organization): ${label}: not available (HTTP 403") -and $r.Output -notmatch 'GitHub Team') $r.Output $r = Invoke-Baseline @('-OrganizationPolicy', '-Owner', 'orgUnreadable') Check 'org: another refused read still names the owner role and the admin:org scope' ($r.ExitCode -eq 1 -and $r.Output -match [regex]::Escape('HTTP 403: Stand-in refused to read them); run it as an owner of the organization, with a token that has the admin:org scope') -and $r.Output -notmatch 'GitHub Team') $r.Output + $wfLabel = 'default workflow token read-only, and Actions not approving pull requests' + foreach ($owner in 'orgTokenWrite', 'orgTokenApproves') { + $r = Invoke-Baseline @('-OrganizationPolicy', '-Owner', $owner) + $put = @($r.Bodies | Where-Object { $_.path -eq "orgs/$owner/actions/permissions/workflow" }) + Check "org: $owner gets its default workflow token PUT read-only, without approvals" ($r.ExitCode -eq 0 -and $put.Count -eq 1 -and $put[0].method -eq 'PUT' -and $put[0].body.default_workflow_permissions -eq 'read' -and $put[0].body.can_approve_pull_request_reviews -eq $false -and @($put[0].body.PSObject.Properties).Count -eq 2 -and $r.Output -match [regex]::Escape("organization ${owner}: ${wfLabel}: set")) "$($r.Changes -join '|') $($r.Output)" + } + $r = Invoke-Baseline @('-OrganizationPolicy', '-Owner', 'orgEmpty') + Check 'org: a default workflow token that is already set is left alone' ($r.ExitCode -eq 0 -and -not @($r.Changes | Where-Object { $_ -like '*actions/permissions/workflow*' }).Count -and $r.Output -match [regex]::Escape("organization orgEmpty: ${wfLabel}: already set")) "$($r.Changes -join '|') $($r.Output)" + $r = Invoke-Baseline @('-OrganizationPolicy', '-Owner', 'orgTokenWrite', '-WhatIf') + Check 'org: -WhatIf shows the default workflow token it would set and writes nothing for it' ($r.ExitCode -eq 0 -and -not @($r.Changes | Where-Object { $_ -like '*actions/permissions/workflow*' }).Count -and $r.Output -match [regex]::Escape("organization orgTokenWrite: ${wfLabel}: would set")) "$($r.Changes -join '|') $($r.Output)" + $r = Invoke-Baseline @('-OrganizationPolicy', '-Owner', 'orgTokenRefused') + Check 'org: a refused default workflow token fails the run, and the event policy is still created' ($r.ExitCode -eq 1 -and $r.Output -match [regex]::Escape("organization orgTokenRefused: ${wfLabel}: not available (HTTP 403") -and ($r.Changes -join '|') -eq 'BODY PUT orgs/orgTokenRefused/actions/permissions/workflow|BODY POST orgs/orgTokenRefused/actions/policies') "$($r.Changes -join '|') $($r.Output)" + $r = Invoke-Baseline @('-OrganizationPolicy', '-Owner', 'orgTokenUnreadable') + Check 'org: an unreadable default workflow token fails the run, and the event policy is still created' ($r.ExitCode -eq 1 -and $r.Output -match [regex]::Escape("organization orgTokenUnreadable: ${wfLabel}: not available (couldn't read it: HTTP 403") -and ($r.Changes -join '|') -eq 'BODY POST orgs/orgTokenUnreadable/actions/policies') "$($r.Changes -join '|') $($r.Output)" $planHint = 'organization event policies need GitHub Team or above: run it for each repository instead, with -Repo , or with -All once its -WhatIf looks right' $cases = @( @{ Owner = 'orgFreeRead'; Changes = ''; Says = "orgFreeRead (organization): ${label}: not available (couldn't read its Actions policies: HTTP 403: Upgrade to GitHub Team to enable this feature.); $planHint" } diff --git a/tests/Test-Template.ps1 b/tests/Test-Template.ps1 index 686af2a2..3e7089e2 100644 --- a/tests/Test-Template.ps1 +++ b/tests/Test-Template.ps1 @@ -457,7 +457,7 @@ foreach ($case in $cases) { Check "${name}: the raise-baseline workflow pins each action to a full commit SHA, with its tag in a comment" ($raiseUses.Count -ge 1 -and -not ($raiseUses | Where-Object { $_.Groups[2].Value -notmatch '^[0-9a-f]{40}$' -or $_.Groups[3].Value -notmatch '^# v\d+\.\d+\.\d+$' })) $raiseText $raiseTagLines = @($raiseText -split '\r?\n' | Where-Object { $_.Contains('inputs.tag') }) $raiseTagSafe = -not ($raiseTagLines | Where-Object { $_ -notmatch '^\s*TAG:' }) - Check "${name}: the raise-baseline workflow is called by publish.yml or run by hand, holds no permission by default, keeps no credential after checkout, and keeps the tag out of scripts" ($raiseText.Contains('workflow_call:') -and -not $raiseText.Contains('workflow_run') -and $raiseText -match '(?m)^permissions: \{\}\r?$' -and $raiseText.Contains('persist-credentials: false') -and $raiseText.Contains('http.https://github.com/.extraheader') -and $raiseText -match '(?m)^\s*git -c "http\.https://github\.com/\.extraheader=[^"]*" ls-remote --exit-code --heads origin \$branch' -and $raiseText.Contains('./build/Update-Baseline.ps1 -Version $env:VERSION') -and $raiseText.Contains('gh workflow run ci.yml --ref $branch') -and $raiseText -match '(?m)^\s*gh pr create .*--draft' -and $raiseText.Contains('contents: write') -and $raiseText.Contains('pull-requests: write') -and $raiseText.Contains('actions: write') -and -not $raiseText.Contains('secrets.') -and $raiseTagLines.Count -ge 1 -and $raiseTagSafe) $raiseText + Check "${name}: the raise-baseline workflow is called by publish.yml or run by hand, holds no permission by default, keeps no credential after checkout, and keeps the tag out of scripts, and opens an issue with its pull request's link" ($raiseText.Contains('workflow_call:') -and -not $raiseText.Contains('workflow_run') -and $raiseText -match '(?m)^permissions: \{\}\r?$' -and $raiseText.Contains('persist-credentials: false') -and $raiseText.Contains('http.https://github.com/.extraheader') -and $raiseText -match '(?m)^\s*git -c "http\.https://github\.com/\.extraheader=[^"]*" ls-remote --exit-code --heads origin \$branch' -and $raiseText.Contains('./build/Update-Baseline.ps1 -Version $env:VERSION') -and $raiseText.Contains('gh issue create') -and $raiseText.Contains('gh issue edit') -and $raiseText.Contains('quick_pull=1') -and $raiseText.Contains('Closes #$number') -and $raiseText.Contains('contents: write') -and $raiseText.Contains('issues: write') -and -not $raiseText.Contains('gh pr create') -and -not $raiseText.Contains('gh workflow run') -and -not $raiseText.Contains('pull-requests: write') -and -not $raiseText.Contains('actions: write') -and -not $raiseText.Contains('secrets.') -and $raiseTagLines.Count -ge 1 -and $raiseTagSafe) $raiseText $workflow = Get-Content -LiteralPath $publish -Raw $uses = [regex]::Matches($workflow, '(?m)^\s+(?:- )?uses: (\S+)@(\S+)[ \t]*(#[^\r\n]*)?\r?$') Check "${name}: the publish workflow pins each action to a full commit SHA, with its tag in a comment" ($uses.Count -ge 4 -and -not ($uses | Where-Object { $_.Groups[2].Value -notmatch '^[0-9a-f]{40}$' -or $_.Groups[3].Value -notmatch '^# v\d+\.\d+\.\d+$' })) $workflow @@ -542,6 +542,7 @@ foreach ($case in $cases) { $v112Group = ' group: code-review-${{ github.event_name == ''issue_comment'' && !(github.event.comment.body == ''/review'' || startsWith(github.event.comment.body, format(''/review{0}'', fromJSON(''"\n"''))) || startsWith(github.event.comment.body, format(''/review{0}'', fromJSON(''"\r\n"'')))) && format(''command-{0}'', github.event.comment.id) || github.event.pull_request.number || github.event.issue.number }}' Check "${name}: the code review caller's review job puts only a comment whose first line is exactly /review in the pull request's concurrency group" ($reviewJob.Contains($v112Group)) $reviewJob Check "${name}: the code review caller passes approve: true in the review job alone" ([regex]::Matches($reviewJob, '(?m)^\s+approve: true\r?$').Count -eq 1 -and -not $outcomesJob.Contains('approve:')) $caller + Check "${name}: the code review caller passes the approver's key from the environment in the review job alone" ($reviewJob.Contains('approver-private-key: ${{ secrets.NCODE_REVIEW_APPROVER_PRIVATE_KEY }}') -and -not $outcomesJob.Contains('approver')) $caller Check "${name}: the code review caller's outcomes job runs only on a closed pull request from the repository, outside the environment, reading contents and pull requests, with only the app key and without cancelling a review" ($outcomesJob.Contains("github.event_name == 'pull_request_target' && github.event.action == 'closed' &&") -and $outcomesJob.Contains('github.event.pull_request.head.repo.full_name == github.repository') -and $outcomesJob -match '(?m)^ group: code-review-\$\{\{ github\.event\.pull_request\.number \}\}\r?\n cancel-in-progress: false\r?$' -and $outcomesJob -match '(?m)^ permissions:\r?\n contents: read\r?\n pull-requests: read\r?\n steps:\r?$' -and $outcomesJob -notmatch '(?m)^\s+environment:' -and $outcomesJob -notmatch '(?m)^\s+id-token:' -and -not $outcomesJob.Contains('actions/checkout') -and $outcomesJob.Contains('app-private-key: ${{ secrets.NCODE_REVIEW_APP_PRIVATE_KEY }}') -and -not $outcomesJob.Contains('bedrock-api-key')) $outcomesJob $checkouts = [regex]::Matches($caller, '(?m)^\s+uses: actions/checkout@').Count Check "${name}: the code review caller checks out only the default branch, without persisted credentials, and never the pull request's head" ($checkouts -eq 1 -and [regex]::Matches($caller, '(?m)^\s+persist-credentials: false\r?$').Count -eq 1 -and -not $caller.Contains('refs/pull/') -and -not $caller.Contains('head.sha')) $caller diff --git a/tests/Test-UpdateNotes.ps1 b/tests/Test-UpdateNotes.ps1 index f0dde2b7..c58b64af 100644 --- a/tests/Test-UpdateNotes.ps1 +++ b/tests/Test-UpdateNotes.ps1 @@ -29,9 +29,9 @@ .template\Publish-Release.ps1 refuses or without AGENTS.md. tools\adopt\Adoption.psm1's copy answers the same. badge Get-BadgeReminder prints the badge line to add when best_practices_project is set and README.md lacks the badge, and nothing when README.md has it or the answer is unset. - code-review Get-CodeReviewNote names a code-review.yml that pins NCodeGroup/code-review before v1.4.0 or passes - no approve: true, and an AGENTS.md Landing section that doesn't say draft: yes, and says nothing for a - current setup or a project without code-review.yml. + code-review Get-CodeReviewNote names a code-review.yml that pins NCodeGroup/code-review before v1.5.0, passes + no approve: true or passes it without approver-private-key, and an AGENTS.md Landing section that + doesn't say draft: yes, and says nothing for a current setup or a project without code-review.yml. immutable Get-ImmutableReleaseNote says to delete or leave out SECURITY.md's "Releases are immutable" paragraph when a workflow runs on a release event or uploads release assets, and nothing otherwise, such as for an upload named only in a comment line. @@ -306,13 +306,15 @@ $codeReviewNote = & { $fn = $ast.Find({ param($node) $node -is [Management.Automation.Language.FunctionDefinitionAst] -and $node.Name -eq 'Get-CodeReviewNote' }, $true) . ([scriptblock]::Create($fn.Extent.Text)) $pin = 'NCodeGroup/code-review@0123456789abcdef0123456789abcdef01234567' - $review = { param([string]$Tag, [bool]$Approve) "jobs:`n review:`n steps:`n - uses: $pin # $Tag`n with:`n$(if ($Approve) { " approve: true`n" })" } + $review = { param([string]$Tag, [bool]$Approve) "jobs:`n review:`n steps:`n - uses: $pin # $Tag`n with:`n$(if ($Approve) { " approve: true`n approver-private-key: `${{ secrets.NCODE_REVIEW_APPROVER_PRIVATE_KEY }}`n" })" } $reviewCases = [ordered]@{ 'old pin, no approve, draft no' = @{ Workflow = (& $review 'v1.3.0' $false); Agents = "# P`n`n## Landing`n`n- draft: no`n"; Want = @('pins NCodeGroup/code-review v1.3.0', 'passes no approve: true', 'says draft: no', 'Set-RepositoryBaseline.ps1 again'); Not = @() } - 'current' = @{ Workflow = (& $review 'v1.4.0' $true); Agents = "# P`n`n## Landing`n`n- draft: yes`n"; Want = @(); Not = @() } + 'current' = @{ Workflow = (& $review 'v1.5.0' $true); Agents = "# P`n`n## Landing`n`n- draft: yes`n"; Want = @(); Not = @() } 'newer, two jobs' = @{ Workflow = (& $review 'v1.10.0' $true) + " - uses: $pin # v1.12.1`n"; Agents = "# P`n`n## Landing`n`n- draft: yes`n"; Want = @(); Not = @() } - 'no draft line' = @{ Workflow = (& $review 'v1.4.0' $true); Agents = "# P`n`n## Landing`n`n- integrate: pull-request`n"; Want = @('has no draft line'); Not = @('pins', 'passes no approve') } + 'no draft line' = @{ Workflow = (& $review 'v1.5.0' $true); Agents = "# P`n`n## Landing`n`n- integrate: pull-request`n"; Want = @('has no draft line'); Not = @('pins', 'passes no approve') } 'tag pin, no comment' = @{ Workflow = "jobs:`n review:`n steps:`n - uses: NCodeGroup/code-review@v1.3.0`n with:`n approve: true`n"; Agents = "# P`n`n## Landing`n`n- draft: yes`n"; Want = @('pins NCodeGroup/code-review v1.3.0'); Not = @('passes no approve', 'says draft', 'has no draft line') } + 'approve without approver key' = @{ Workflow = "jobs:`n review:`n steps:`n - uses: $pin # v1.5.0`n with:`n approve: true`n"; Agents = "# P`n`n## Landing`n`n- draft: yes`n"; Want = @('has no approver-private-key input', 'Enable-CodeReview.ps1 -ApproverPrivateKeyPath'); Not = @('pins', 'passes no approve: true') } + 'pin before the approver' = @{ Workflow = (& $review 'v1.4.0' $true); Agents = "# P`n`n## Landing`n`n- draft: yes`n"; Want = @('pins NCodeGroup/code-review v1.4.0'); Not = @('has no approver-private-key input') } 'no code-review.yml' = @{ Workflow = $null; Agents = "# P`n`n## Landing`n`n- draft: no`n"; Want = @(); Not = @() } } foreach ($name in $reviewCases.Keys) { diff --git a/tools/Set-RepositoryBaseline.ps1 b/tools/Set-RepositoryBaseline.ps1 index 75428a2e..d6d5ca3c 100644 --- a/tools/Set-RepositoryBaseline.ps1 +++ b/tools/Set-RepositoryBaseline.ps1 @@ -7,7 +7,8 @@ For each repository it: - adds a "Protect main" ruleset on the default branch, the same shape as project-template's: no deletion, no force push, a pull request required (no approvals, since the organization has one maintainer, except where - code-review.yml passes approve: true and a second person has write access, as below) with every conversation + code-review.yml passes approve: true and a second person has write access, or NCode Review's approver is set up, + as below) with every conversation resolved, with stale reviews dismissed on push, so a review finding from the bot, CodeQL or a person can't be merged past, merge-commit or rebase merges only, never squash, so each commit of a plan stays on the branch, when CodeQL's default setup is configured for the repository and analyzes at least one language a code-scanning @@ -25,8 +26,8 @@ - adds a "Protect release tags" ruleset on the tags matching v* (refs/tags/v*): no deletion and no update, so a tag is never moved, with no bypass. A release tag names one published package set, so it never changes; - turns on the security settings a public project should have, each where it is off: the workflow token - (GITHUB_TOKEN) read-only by default, with GitHub Actions not allowed to create and approve pull requests, except - where the default branch has .github/workflows/raise-baseline.yml, which opens a pull request; secret scanning + (GITHUB_TOKEN) read-only by default, with GitHub Actions never allowed to create and approve pull requests, in every + repository (the template's ADR-0036); secret scanning and its push protection; Dependabot alerts and Dependabot security updates, which need the alerts; private vulnerability reporting; and immutable releases, except where a .yml or .yaml file in the default branch's .github/workflows runs on a release event or uploads release assets (gh release upload, @@ -55,7 +56,13 @@ script can, gets it turned off, and the run says so. A file it can't read is named, and the ruleset then requires no approval. - Where one person has write access, counted as the users the collaborators list + Where NCode Review's approver is set up, meaning code-review.yml passes approve: true and a non-empty + approver-private-key and the repository's code-review environment holds the secret + NCODE_REVIEW_APPROVER_PRIVATE_KEY, the NCode Review Approver, an app that can write, submits the approval, so the + ruleset requires one approval, of the last push, with one writer too (the template's ADR-0036). With the input but + no secret the run says so and names the fix, and the ruleset gets no approval for it. + + Where one person has write access and the approver isn't set up, counted as the users the collaborators list (repos///collaborators?affiliation=all&permission=push) gives, it requires no approval and no approval of the last push, also where code-review.yml passes approve: true, and a "Protect main" ruleset that requires an approval gets both turned off, and the run says so, also with -WhatIf: GitHub counts toward a required approval only @@ -121,11 +128,12 @@ stays on, since the script never loosens a setting. Where they are already on and a workflow runs on a release event or uploads release assets, it prints a notice with the command that turns them off. - -OrganizationPolicy, with -Owner alone, creates the same policy once for the organization, on every repository - (~ALL), and touches no repository: run it as an organization owner, with a token that has the admin:org scope (gh - auth refresh -h github.com -s admin:org). It reads the organization's policies first and updates one of that + -OrganizationPolicy, with -Owner alone, first sets the organization's default workflow token to read-only with + GitHub Actions not allowed to approve pull requests, where either is off (the template's ADR-0036), then creates + the same policy once for the organization, on every repository (~ALL), and touches no repository: run it as an + organization owner, with a token that has the admin:org scope (gh auth refresh -h github.com -s admin:org). It reads the organization's policies first and updates one of that name in place, keeping the other events it allows, when it isn't active, misses one of those events or doesn't cover both files on every repository, and leaves alone one that does, or an active one that already allows pull_request_target and issue_comment for both files on every repository; -WhatIf prints the body it - would post. It exits 1 when it can't read the policies or the API refuses the policy. + would post. It exits 1 when it can't read the policies or the API refuses the policy or the default token setting. It needs GitHub Team or above, the plans GitHub offers organization event policies on: when GitHub refuses them for the organization's plan, with an answer that asks to upgrade, such as "Upgrade to GitHub Team to enable this feature.", it says so and to run it for each repository instead, with -Repo or -All. @@ -152,8 +160,8 @@ param( # one value for a parameter, so a list has to arrive as one string). Only with -Repo. Or auto, alone, which reads them # from each repository's latest merged pull request, and works with -All too. [string[]]$RequireChecks = @(), - # Creates the organization's Actions event policy for the code-review workflows of every repository, instead of each - # repository's own. Only with -Owner; an organization owner runs it, with the admin:org scope, on GitHub Team or above. + # Sets the organization's default workflow token and creates its Actions event policy for the code-review workflows of + # every repository, instead of each repository's own. Only with -Owner; an organization owner runs it, with the admin:org scope, on GitHub Team or above. [switch]$OrganizationPolicy, # Leaves immutable releases off in each repository, for one whose releases get files after they are published. [switch]$SkipImmutableReleases, @@ -307,14 +315,26 @@ function Get-PassingChecks([string]$Name, [string]$Branch) { # Reads the default branch's .github/workflows/code-review.yml to see whether NCode Review approves: its job passes # approve: true (ADR-0022). Approver is $true then; Why says why the file couldn't be read, and is $null when it was -# read or isn't there (404), so a repository without the workflow just gets no approval requirement. +# read or isn't there (404), so a repository without the workflow just gets no approval requirement. ApproverApp is +# $true when the file also passes approver-private-key and the repository's code-review environment holds the +# NCODE_REVIEW_APPROVER_PRIVATE_KEY secret, so the NCode Review Approver, which can write, submits the approval and +# GitHub counts it (ADR-0036); ApproverWhy says why it isn't, and is $null otherwise. function Read-ReviewApproval([string]$Name, [string]$Branch) { $read = Invoke-HostApi gh "repos/$Owner/$Name/contents/.github/workflows/code-review.yml?ref=$Branch" - if ($read.Status -eq 404) { return [pscustomobject]@{ Approver = $false; Why = $null } } - if ($read.Status -ne 200) { return [pscustomobject]@{ Approver = $false; Why = Get-FailureReason $read } } + if ($read.Status -eq 404) { return [pscustomobject]@{ Approver = $false; Why = $null; ApproverApp = $false; ApproverWhy = $null } } + if ($read.Status -ne 200) { return [pscustomobject]@{ Approver = $false; Why = Get-FailureReason $read; ApproverApp = $false; ApproverWhy = $null } } $text = Get-ContentText $read.Body - if ($null -eq $text) { return [pscustomobject]@{ Approver = $false; Why = 'the contents API sent no base64 UTF-8 text' } } - [pscustomobject]@{ Approver = $text -match '(?m)^\s+approve:\s*["'']?true["'']?\s*(#.*)?$'; Why = $null } + if ($null -eq $text) { return [pscustomobject]@{ Approver = $false; Why = 'the contents API sent no base64 UTF-8 text'; ApproverApp = $false; ApproverWhy = $null } } + $approver = $text -match '(?m)^\s+approve:\s*["'']?true["'']?\s*(#.*)?$' + $app = $false + $appWhy = $null + if ($approver -and $text -match '(?m)^\s+approver-private-key:\s*\S') { + $secret = Invoke-HostApi gh "repos/$Owner/$Name/environments/code-review/secrets/NCODE_REVIEW_APPROVER_PRIVATE_KEY" + if ($secret.Status -eq 200) { $app = $true } + elseif ($secret.Status -eq 404) { $appWhy = 'its code-review environment has no NCODE_REVIEW_APPROVER_PRIVATE_KEY: run tools/Enable-CodeReview.ps1 -ApproverPrivateKeyPath from NCodeGroup/code-review' } + else { $appWhy = Get-FailureReason $secret } + } + [pscustomobject]@{ Approver = $approver; Why = $null; ApproverApp = $app; ApproverWhy = $appWhy } } # Counts the users the collaborators list gives with push access or more. GitHub counts toward a required approval only @@ -343,12 +363,18 @@ function Set-Baseline([string]$Name) { $writers = Read-Writers $Name if ($writers.Why) { Write-Host "${Name}: couldn't read who has write access ($($writers.Why)); the ruleset gets no approval it doesn't have, and keeps the approvals it has" } $soleWriter = $null -ne $writers.Count -and $writers.Count -le 1 - $approver = [bool]($review.Approver -and $null -ne $writers.Count -and $writers.Count -ge 2) - if ($review.Approver -and $soleWriter) { - Write-Host "${Name}: code-review.yml passes approve: true, but one person has write access, and GitHub counts toward a required approval neither the author's approval nor NCode Review's, whose app has no write access: the ruleset requires no approval and no approval of the last push (the template's ADR-0034)" + $approver = [bool]($review.Approver -and ($review.ApproverApp -or ($null -ne $writers.Count -and $writers.Count -ge 2))) + if ($review.ApproverWhy) { + Write-Host "${Name}: code-review.yml passes approver-private-key, but $($review.ApproverWhy); the approver can't approve, so the ruleset gets no approval for it" + } + if ($review.ApproverApp) { + Write-Host "${Name}: NCode Review approves as the NCode Review Approver, which can write, so the ruleset requires one approval, of the last push (the template's ADR-0036)" + } + if ($review.Approver -and $soleWriter -and -not $review.ApproverApp) { + Write-Host "${Name}: code-review.yml passes approve: true, but one person has write access, and GitHub counts toward a required approval neither the author's approval nor NCode Review's, whose app has no write access: the ruleset requires no approval and no approval of the last push (the template's ADR-0034 and ADR-0036)" } # A repository skipped for its default branch gets nothing else either: the reason printed says what to fix first. - if (-not (Set-BranchRuleset $Name $info.default_branch $rulesets -Approver $approver -SoleWriter $soleWriter)) { return } + if (-not (Set-BranchRuleset $Name $info.default_branch $rulesets -Approver $approver -SoleWriter ($soleWriter -and -not $review.ApproverApp))) { return } Set-TagRuleset $Name $rulesets Set-SecuritySettings $Name $info Set-AutoMerge $Name $info @@ -555,7 +581,7 @@ function Set-BranchRuleset { elseif ($codeql) { ", and a code-scanning rule (CodeQL's default setup analyzes $($languages -join ', '))" } elseif ($languageless) { ", and no code-scanning rule (CodeQL's default setup analyzes no language)" } else { ", and no code-scanning rule (CodeQL's default setup is not configured)" } - $summary = "$Name ($Branch): $verb '$rulesetName' with $($checks.Count) required check(s)$(if ($checks.Count) { ': ' + ($checks -join ', ') })$scanning$(if ($Approver) { ', at least one required approval, as code-review.yml passes approve: true' })$(if ($lowered) { ", and requires no approval and no approval of the last push, $soleWhy" } elseif ($lastPushOff) { ", and turns off approval of the last push, $lastPushWhy" })$(if ($suite) { "; switch CodeQL from $suite to extended" })" + $summary = "$Name ($Branch): $verb '$rulesetName' with $($checks.Count) required check(s)$(if ($checks.Count) { ': ' + ($checks -join ', ') })$scanning$(if ($Approver) { ', at least one required approval, as NCode Review approves' })$(if ($lowered) { ", and requires no approval and no approval of the last push, $soleWhy" } elseif ($lastPushOff) { ", and turns off approval of the last push, $lastPushWhy" })$(if ($suite) { "; switch CodeQL from $suite to extended" })" if (-not $PSCmdlet.ShouldProcess($Name, "$verb ruleset and delete-branch-on-merge")) { Write-Host "would: $summary" if ($autoChecks) { @@ -878,12 +904,12 @@ function Set-SecuritySetting { # organization fixes (HTTP 409). function Set-SecuritySettings([string]$Name, $Info) { $base = "repos/$Owner/$Name" - # GitHub's "Allow GitHub Actions to create and approve pull requests" is one setting: it is on only where - # raise-baseline.yml must open its pull request (the template's ADR-0150), and a read that fails leaves it off. - $raiser = (Invoke-HostApi gh "$base/contents/.github/workflows/raise-baseline.yml?ref=$($Info.default_branch)").Status -eq 200 - $label = if ($raiser) { 'read-only workflow token, and Actions opening the baseline pull request' } else { 'read-only workflow token, and Actions not approving pull requests' } - $state = Get-SettingState (Invoke-HostApi gh "$base/actions/permissions/workflow") { param($answer) $answer.default_workflow_permissions -eq 'read' -and [bool]$answer.can_approve_pull_request_reviews -eq $raiser } - Set-SecuritySetting $Name $label $state PUT "$base/actions/permissions/workflow" @{ default_workflow_permissions = 'read'; can_approve_pull_request_reviews = $raiser } + # GitHub's "Allow GitHub Actions to create and approve pull requests" is off everywhere: a workflow that can approve + # lets any writer's workflow approve its own pull request, which a required approval would then count (the + # template's ADR-0036). + $label = 'read-only workflow token, and Actions not approving pull requests' + $state = Get-SettingState (Invoke-HostApi gh "$base/actions/permissions/workflow") { param($answer) $answer.default_workflow_permissions -eq 'read' -and -not [bool]$answer.can_approve_pull_request_reviews } + Set-SecuritySetting $Name $label $state PUT "$base/actions/permissions/workflow" @{ default_workflow_permissions = 'read'; can_approve_pull_request_reviews = $false } $features = [ordered]@{ secret_scanning = 'secret scanning'; secret_scanning_push_protection = 'secret scanning push protection' } foreach ($feature in $features.Keys) { @@ -1002,6 +1028,24 @@ function Get-PlanRefusalHint([string]$Reason) { 'organization event policies need GitHub Team or above: run it for each repository instead, with -Repo , or with -All once its -WhatIf looks right' } +# The organization's default workflow token, read-only and not allowed to approve pull requests, which every repository +# without a setting of its own takes (the template's ADR-0036). Returns $true unless the read or the write failed. +function Set-OrganizationWorkflowPermissions { + [CmdletBinding(SupportsShouldProcess)] + param() + $path = "orgs/$Owner/actions/permissions/workflow" + $label = 'default workflow token read-only, and Actions not approving pull requests' + $state = Get-SettingState (Invoke-HostApi gh $path) { param($answer) $answer.default_workflow_permissions -eq 'read' -and -not [bool]$answer.can_approve_pull_request_reviews } + $name = "organization ${Owner}" + if ($state -is [string]) { Write-Host "${name}: ${label}: not available ($state)"; return $false } + if ($state) { Write-Host "${name}: ${label}: already set"; return $true } + if (-not $PSCmdlet.ShouldProcess($Owner, "turn on $label")) { Write-Host "${name}: ${label}: would set"; return $true } + $result = Invoke-HostWrite PUT $path @{ default_workflow_permissions = 'read'; can_approve_pull_request_reviews = $false } + if ($result.Status -ge 200 -and $result.Status -lt 300) { Write-Host "${name}: ${label}: set"; return $true } + Write-Host "${name}: ${label}: not available ($(Get-FailureReason $result))" + return $false +} + # The same policy once for the organization, on every repository (~ALL). Its own policy, by name, is updated in place # when it isn't active, misses an event or doesn't cover both files on every repository. Returns $true unless it can't # read the policies or the API refuses the policy. It writes only its report lines (and, with -WhatIf, the body) to the host. @@ -1054,7 +1098,7 @@ function Set-OrganizationEventPolicy { return $false } -if ($OrganizationPolicy) { if (Set-OrganizationEventPolicy) { exit 0 } else { exit 1 } } +if ($OrganizationPolicy) { $workflow = Set-OrganizationWorkflowPermissions; $policy = Set-OrganizationEventPolicy; if ($workflow -and $policy) { exit 0 } else { exit 1 } } foreach ($name in Get-Targets) { try { Set-Baseline $name } catch { Write-Host "${name}: FAILED: $($_.Exception.Message)" -ForegroundColor Red } } diff --git a/workflow/templates/_changelog.md b/workflow/templates/_changelog.md index 3a2d9d35..fae05b94 100644 --- a/workflow/templates/_changelog.md +++ b/workflow/templates/_changelog.md @@ -18,7 +18,7 @@ The plan's last step writes the plan's entries, for every plan: When the repository has a `version.json` at its root, which Nerdbank.GitVersioning builds each package's version from, and the plan has a `Release:` line, the same last step also sets that file's `version` to the `Release:` version without its leading `v`, such as `"1.4.0"` for `v1.4.0`, changing nothing else, and lists `version.json` on its Files line: a release tag whose commit holds another version publishes no package. When that version starts a new major version and the file's `assemblyVersion` names a `version`, the step also sets `assemblyVersion` to `{ "precision": "major" }`. The state script prints `version-file: match` when the file holds the plan's version, `mismatch ` when it holds another, and `-` without the file or a `Release:` line. -When the repository has `.github/workflows/raise-baseline.yml`, that workflow opens the pull request that raises `PackageValidationBaselineVersion` once nuget.org lists a release: a plan never raises the baseline in a step or lists raising it under `## Follow-ups`. +When the repository has `.github/workflows/raise-baseline.yml`, that workflow pushes the branch that raises `PackageValidationBaselineVersion` once nuget.org lists a release and opens an issue whose link opens its pull request: a plan never raises the baseline in a step or lists raising it under `## Follow-ups`. Write the step so the executor copies text: it gives the heading, each entry under its group, and each link line in full. In a pre-release project, it gives each entry to add in full, and each entry to rewrite or delete by its first words and, for a rewrite, its new text in full. Only `` is left to the executor, with the `Get-Date` command. Never reformat a changelog in another format, or an older section of any changelog, unless the request asks for it, as an adopted project's follow-up does; a heading that `changelog-duplicates` names in an older release section stays as it is. A plan that converts a changelog keeps every entry's text. It dates each version's heading with its tag's date (`git log -1 --format=%as `), puts each entry in one group, and adds the preamble, `## [Unreleased]` and the link reference definitions.