Skip to content

Commit ee6c21e

Browse files
committed
rename scripts
1 parent d1db0b6 commit ee6c21e

13 files changed

Lines changed: 25 additions & 11 deletions

scripts/release_notes_generate_ai.py renamed to scripts/release-notes-ai-generator/__main__.py

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,16 @@
33

44
"""Generate TiDB improvements and bug fixes for release notes according to PRs and issues in a specified excel file.
55
6-
Typical usage:
6+
Typical usage (run from the scripts/ directory):
77
8-
python3 scripts/release_notes_generate_ai.py \
8+
python3 -m release_notes_ai \
99
--version 8.5.7 \
1010
--excel /path/to/release-note-excel.xlsx \
1111
--releases-dir releases
1212
13-
For detailed usage and options, see scripts/release-notes-generator-readme.md.
13+
For detailed usage and options, see release-notes-generator-readme.md in this directory.
1414
"""
1515

16-
from release_notes_ai.cli import main
16+
from .cli import main
1717

18-
19-
if __name__ == "__main__":
20-
raise SystemExit(main())
18+
raise SystemExit(main())
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

scripts/release-notes-generator-readme.md renamed to scripts/release-notes-ai-generator/release-notes-generator-readme.md

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Release notes generator
22

3-
`scripts/release_notes_generate_ai.py` generates English TiDB release notes for the `Improvements` and `Bug fixes` sections according to PRs and issues in a Excel workbook.
3+
`python3 -m release_notes_ai` (run from the `scripts/` directory) generates English TiDB release notes for the `Improvements` and `Bug fixes` sections according to PRs and issues in a Excel workbook.
44

55
The generator keeps the source workbook unchanged, writes all processing results to a processed workbook, and renders the generated entries to a Markdown release note file.
66

@@ -33,7 +33,6 @@ The generator keeps the source workbook unchanged, writes all processing results
3333

3434
The generator does not create a complete formal release note. It does not generate sections such as compatibility changes, known issues, deprecations, or upgrade notes.
3535

36-
3736
## Prerequisites
3837

3938
- Install Python dependencies:
@@ -50,15 +49,32 @@ The generator does not create a complete formal release note. It does not genera
5049

5150
- Install and log in to Codex CLI. The default `--ai-command` uses `codex exec`, so the installed Codex CLI must support `exec`, `--sandbox read-only`, `--ephemeral`, `--output-schema`, `--output-last-message`, and `-m <model>`. If you use `--ai-provider azure` instead, Codex CLI is not required; set `AZURE_OPENAI_KEY` and `AZURE_OPENAI_BASE_URL` (or `OPENAI_BASE_URL`) environment variables.
5251

53-
## Typical usage
52+
## Typical usage examples
53+
54+
Use Codex to generate release notes:
5455

5556
```bash
56-
python3 scripts/release_notes_generate_ai.py \
57+
cd scripts
58+
python3 -m release_notes_ai \
5759
--version 8.5.7 \
5860
--excel /path/to/release-note-excel.xlsx \
5961
--releases-dir releases
6062
```
6163

64+
Use Azure OpenAI to generate release notes:
65+
66+
```bash
67+
export AZURE_OPENAI_KEY=<your-key>
68+
export AZURE_OPENAI_BASE_URL=<your-endpoint>
69+
export GITHUB_TOKEN=<your-token>
70+
cd scripts
71+
python3 -m release_notes_ai \
72+
--version 8.5.7 \
73+
--excel /path/to/release-note-excel.xlsx \
74+
--releases-dir releases \
75+
--ai-provider azure
76+
```
77+
6278
## Option descriptions
6379

6480
| Option | Required | Default value | Usage example | Description |

0 commit comments

Comments
 (0)