1.4 KiB
1.4 KiB
Changelog Generator
Description
This Python script allows you to generate changelogs and release notes based on Redmine tickets. It uses the OpenAI API to automatically create the changelog entries.
Features
- Retrieve projects and versions from Redmine
- Retrieve tickets for a specific project and version
- Generate changelog entries based on the ticket information using the OpenAI API
- Output the changelog in AsciiDoc format
Prerequisites
- Python 3.x
- The following Python packages:
- urllib
- json
- dotenv
- ssl
- argparse
- Redmine API key
- OpenAI API key
Usage
- Copy the
.env.examplefile and rename it to.env. Fill in the environment variablesREDMINE_HOST,REDMINE_API_KEY, andOPENAI_API_KEYwith your access credentials. - Run the script with the following arguments:
-p, --project: The project ID for which the changelog should be generated.-f, --fixed-version: The version ID for which the changelog should be generated.-t, --type: The type of text to be generated (Changelog or Release Notes).
- If you don't provide a project ID or version ID, a list of available projects and versions will be displayed for you to choose from.
- The generated changelog will be output in AsciiDoc format on the console.
Examples
python3 changelog_generator.py -p 47 -f 755 -t Changelog
python3 changelog_generator.py -p 47 -f 755 -t ReleaseNotes