From 0fd63409f640388f0f18a3eb9bbc3f033a3f4f2d Mon Sep 17 00:00:00 2001 From: isra-fel <11371776+isra-fel@users.noreply.github.com> Date: Fri, 9 Oct 2026 16:20:04 +1100 Subject: [PATCH 1/2] {Misc.} Add Copilot instructions to prevent manual HISTORY.rst edits Release history notes are generated automatically from PR titles and descriptions. Add a .github/instructions file so GitHub Copilot flags manual HISTORY.rst changes during PR review and requests reverts. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 4b6414b3-5257-4e50-bf71-865cf4cc38b6 --- .../instructions/history-rst.instructions.md | 28 +++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 .github/instructions/history-rst.instructions.md diff --git a/.github/instructions/history-rst.instructions.md b/.github/instructions/history-rst.instructions.md new file mode 100644 index 00000000000..bb6a09f1fd0 --- /dev/null +++ b/.github/instructions/history-rst.instructions.md @@ -0,0 +1,28 @@ +--- +applyTo: "**/HISTORY.rst" +description: "Do not manually edit HISTORY.rst files; release history is generated automatically." +--- + +When reviewing or editing changes in this repository: + +- Do **not** manually add, modify, or delete entries in any `HISTORY.rst` file + (for example `src/azure-cli/HISTORY.rst` or `src/azure-cli-core/HISTORY.rst`). + Release history notes are generated automatically from PR titles and descriptions + by the release pipeline (`scripts/release/generate_history_notes.py`). +- During PR review, if a pull request contains manual changes to a `HISTORY.rst` + file, request that the author revert those changes while preserving the + functional (non-`HISTORY.rst`) changes. Reviewers consistently ask contributors + to "revert the changes to the HISTORY.rst, as the history notes would be + generated automatically." +- To control what appears in the release history, use the PR title and the + `History Notes` section of the PR description instead of editing `HISTORY.rst`: + - A `[Component Name]` title prefix marks a customer-facing change that will be + added to `HISTORY.rst`; a `{Component Name}` prefix marks a change that will + **not** be included. + - See `doc/authoring_command_modules/README.md` ("Format PR Title" and + "Format PR Description") for the required format. +- The only exception is a **Hotfix** PR targeting the `release` branch: per + `doc/authoring_command_modules/README.md`, customer-facing hotfixes must + manually add their history notes because the auto-generated notes ignore + PRs marked `Hotfix`. Outside this hotfix flow, manual `HISTORY.rst` edits + should be reverted. From 59f7cb923a54f898de3d88dcfc83005d9c2219b8 Mon Sep 17 00:00:00 2001 From: Yeming Liu <11371776+isra-fel@users.noreply.github.com> Date: Fri, 9 Oct 2026 16:32:31 +1100 Subject: [PATCH 2/2] Modify applyTo for HISTORY.rst files Update applyTo path for HISTORY.rst instructions. Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> --- .github/instructions/history-rst.instructions.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/instructions/history-rst.instructions.md b/.github/instructions/history-rst.instructions.md index bb6a09f1fd0..747c1c199b5 100644 --- a/.github/instructions/history-rst.instructions.md +++ b/.github/instructions/history-rst.instructions.md @@ -1,5 +1,5 @@ --- -applyTo: "**/HISTORY.rst" +applyTo: "{src/azure-cli/HISTORY.rst,src/azure-cli-core/HISTORY.rst}" description: "Do not manually edit HISTORY.rst files; release history is generated automatically." ---