No description
Find a file
2025-06-10 21:03:06 +02:00
changelog2 initial commit to push copy to codeberg 2024-09-20 16:00:11 +02:00
compose.yaml initial commit to push copy to codeberg 2024-09-20 16:00:11 +02:00
create-changelog.sh initial commit to push copy to codeberg 2024-09-20 16:00:11 +02:00
devbox.json initial commit to push copy to codeberg 2024-09-20 16:00:11 +02:00
devbox.lock initial commit to push copy to codeberg 2024-09-20 16:00:11 +02:00
Dockerfile initial commit to push copy to codeberg 2024-09-20 16:00:11 +02:00
get_redmine_infos.py initial commit to push copy to codeberg 2024-09-20 16:00:11 +02:00
pyproject.toml initial commit to push copy to codeberg 2024-09-20 16:00:11 +02:00
README.md initial commit to push copy to codeberg 2024-09-20 16:00:11 +02:00
renovate.json Add renovate.json 2025-06-04 15:26:53 +00:00
requirements.txt Update dependency setuptools to v74.1.3 2025-06-10 21:02:53 +02:00

Changelog Generator Tool

This project provides an AI-powered tool that automates the generation of changelogs by collecting information from Git logs and Redmine tickets. It uses a crew of AI agents to improve the quality and efficiency of the final changelog.

Project Overview

The system uses multiple AI agents, each responsible for a specific part of the changelog generation process. This tool is designed to:

  • Gather data from Git logs and Redmine tickets.
  • Analyze and categorize the collected information.
  • Generate a well-formatted changelog or release notes.
  • Ensure the output is consistent with project guidelines and requirements.

Key Components

Main Script (main.py)

The main entry point of the tool. It handles command-line arguments, sets up the environment, and initiates the changelog generation process.

Crew Definition (crew.py)

Defines the AI agents and their tasks using the crewai framework. It includes:

  • GitlogAnalyst: Analyzes Git commit logs.
  • RedmineAnalyst: Retrieves and analyzes Redmine issues.
  • WritingAgent: Generates the final changelog or release notes.

Configuration

  • config/config.py: Parses configuration settings.
  • config/agents.yaml: Defines agent configurations.
  • config/tasks.yaml: Defines task configurations.

Tools

  • tools/tools.py: Contains custom tools for retrieving Git commits and Redmine issues.

Data

  • data/CodeOfConduct.md: Contains the project's code of conduct (used for context).
  • data/template2.txt: Changelog template used by the writing agent.

Usage

  1. Environment Setup for development:

    • This project uses Devbox for development environment management and Poetry for dependency management.
    • Set up the environment using:
      devbox shell
      poetry install
      
  2. Running the Tool:

    • The tool is started using a shell script that manages Docker containers.
    • Basic usage:
      ./create_changelog.sh [options]
      
    • Options:
      • --project: Specify the Redmine project ID
      • --version: Specify the version ID
      • --repo: Path to the Git repository (optional)
      • --type: Type of output (Changelog/ReleaseNotes)
      • --local: Use local LLM instead of OpenAI (optional)
  • If an error occurs that the docker volume ollama-local cannot be found, create it with docker volume create ollama-local
  1. Example Usage:
./create_changelog.sh -projects 123 -versions 456 -type Changelog -repo /path/to/repo

Dependencies

  • Python 3.x
  • Poetry for dependency management
  • Devbox for development environment
  • Docker for running LLM services
  • External services:
  • Redmine API
  • Git repository
  • OpenAI API (optional)
  • Local LLM (optional, e.g., Ollama)

Configuration

The project uses a TOML configuration file named changelog-config.toml for storing essential settings. This file should contain the following entries:

[DEFAULT]
OPENAI_API_KEY = your_openai_api_key_here
REDMINE_API_KEY = your_redmine_api_key_here
REDMINE_HOST = https://your_redmine_host.com
GIT_REPO_PATH = /path/to/your/git/repo

Configuration File Location

The config.py script searches for the changelog-config.toml file in the following locations, in order:

  • Current working directory
  • changelog2 subdirectory of the current working directory
  • '.config' subdirectory of the current working directory
  • User's home directory
  • Location specified by the CHANGELOG_CONFIG environment variable

Make sure to create the changelog-config.toml file with your actual API keys and settings before running the tool. Keep this file secure and do not commit it to version control.

However, a copy of changelog-config.toml should be located in the changelog2 subfolder for execution in the docker container.

Development

  • To add new dependencies: poetry add <package_name>
  • To update dependencies: poetry update

Notes

  • The tool can use either OpenAI's models or a local LLM (like Ollama) for text generation.
  • Ensure all necessary Docker containers are running before starting the tool.