From 09f3786e35d271d35d91a2dbfc24ec1fa48942b3 Mon Sep 17 00:00:00 2001 From: JRoot Junior Date: Sat, 4 Apr 2026 01:11:33 +0300 Subject: [PATCH] Add changelog fragment generator and update poll parameter descriptions --- .claude/commands/aiogram-api-changelog.md | 50 +++++++++++++++++++++++ CHANGES/1792.misc.rst | 1 + 2 files changed, 51 insertions(+) create mode 100644 .claude/commands/aiogram-api-changelog.md diff --git a/.claude/commands/aiogram-api-changelog.md b/.claude/commands/aiogram-api-changelog.md new file mode 100644 index 00000000..909187a1 --- /dev/null +++ b/.claude/commands/aiogram-api-changelog.md @@ -0,0 +1,50 @@ +Generate a Bot API changelog fragment for aiogram. + +Arguments: $ARGUMENTS (format: ` `) + +## Steps + +1. Parse `$ARGUMENTS`: the first token is the issue/PR number (e.g. `1792`), the rest is the changelog URL (e.g. `https://core.telegram.org/bots/api-changelog#april-3-2026`). + +2. Fetch the changelog URL using WebFetch. Extract **all** changes for the Bot API version anchored by that URL: new methods, new types, new/changed fields, new parameters, renamed fields, and any other notable changes. + +3. Discover which aiogram modules were generated for the new symbols: + - New methods → search `aiogram/methods/.py` via Glob + - New types → search `aiogram/types/.py` via Glob + - Confirm every referenced module exists before writing it into the RST. + +4. Create `CHANGES/.misc.rst` (overwrite if it exists) with the following RST structure, following the style used for previous Bot API updates in `CHANGES.rst`: + +```rst +Updated to `Bot API X.Y <{url}>`_ + +**{Section heading — e.g. "Feature Area"}** + +*New Methods:* + +- Added :class:`aiogram.methods..` method - + +*New Types:* + +- Added :class:`aiogram.types..` type - + +*New Fields:* + +- Added :code:`` field to :class:`aiogram.types..` - + +*New Parameters for* :class:`aiogram.methods..`: + +- Added :code:`` - +``` + +Rules for writing the RST: +- Use `:class:`` for types and methods, `:meth:`` for shortcuts, `:code:`` for field/parameter names. +- Module paths must be the full dotted path (e.g. `aiogram.types.poll_option.PollOption`), always verified against real files. +- If a symbol has a shortcut method on a type, mention it with `:meth:`. +- Group related changes under bold section headings (e.g. **Polls**, **Managed Bots**). +- Within each section use italic sub-headings (*New Methods:*, *New Types:*, *New Fields:*, *New Parameters for ...:*) — omit a sub-heading if there is nothing to list under it. +- Describe each item with a brief, user-facing sentence after the dash. +- Do not add a trailing newline after the last bullet. +- Do not include an issue/PR back-reference link (towncrier adds that automatically). + +5. Print the path of the created file and confirm it is done. diff --git a/CHANGES/1792.misc.rst b/CHANGES/1792.misc.rst index b7ed7ba8..9ba352b0 100644 --- a/CHANGES/1792.misc.rst +++ b/CHANGES/1792.misc.rst @@ -43,6 +43,7 @@ Updated to `Bot API 9.6