release notes: add ai generator for improvements and bug fixes#22850
release notes: add ai generator for improvements and bug fixes#22850qiancai wants to merge 4 commits intopingcap:masterfrom
Conversation
|
Skipping CI for Draft Pull Request. |
There was a problem hiding this comment.
Code Review
This pull request introduces a new set of scripts to automate the generation of TiDB release notes using AI. The changes include modules for GitHub data fetching, Excel workbook processing, and AI prompt generation. Feedback provided includes suggestions for memory-efficient text processing and adding logging for truncated file summaries.
|
|
||
|
|
||
| def tail_output(text: str, max_lines: int = 40, max_chars: int = 4000) -> str: | ||
| tail = "\n".join(text.strip().splitlines()[-max_lines:]) |
| lines: list[str] = [] | ||
| page = 1 | ||
| total_chars = 0 | ||
| while len(lines) < max_files: |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
What is changed, added or deleted? (Required)
scripts/release_notes_generate_ai.py.scripts/release_notes_ai/package for workbook preprocessing, scope filtering, duplicate release note reuse, AI/non-AI generation, Markdown rendering, and GitHub API helpers.release-<version>.mdwhen the release note file does not exist, and torelease-<version>-updated-by-ai.mdwhen it already exists.Validation:
git diff --checkPYTHONPATH=scripts PYTHONDONTWRITEBYTECODE=1 python3 scripts/release_notes_generate_ai.py --helpPYTHONPATH=scripts PYTHONDONTWRITEBYTECODE=1 python3 - <<EOFcheck fordefault_output_release_fileWhich TiDB version(s) do your changes apply to? (Required)
What is the related PR or file link(s)?
Do your changes match any of the following descriptions?