Skip to content

fedeflowers/Release_notes_automation

Repository files navigation

Release Notes Automation

LLM-powered workflow for automated release notes generation from GitHub repositories. Built with LangGraph orchestration, Streamlit UI, and comprehensive guardrails for production-quality output.

📖 Full Documentation — Architecture, workflows, services, guardrails, and more.

Features

Core Workflow

  • 🔍 Git Data Harvesting: Extract commits and PRs between any two refs (tags, branches, SHAs)
  • 🧹 Intelligent Triage: LLM-based filtering to identify user-facing vs internal changes
  • 📁 Smart Classification: Categorize changes as Features, Bug Fixes, or Internal
  • ✍️ Polished Drafting: Generate clean, user-friendly release note entries
  • 👀 Human-in-the-Loop Review: Edit, approve, flag, or remove entries
  • 🌐 Multi-Language Translation: Translate release notes to French, German, Italian
  • 📚 MkDocs Export: Generate and host a publishable documentation site

Quality & Security

  • 🛡️ LLM Guardrails: Input sanitization, JSON repair, content moderation
  • 📊 Confidence Thresholding: Flag low-confidence classifications for review
  • 🔒 Prompt Injection Prevention: Sanitize inputs before LLM processing

UI Features

  • 📋 List View: Read-only overview of all entries
  • 🔍 Detail View: Edit individual entries with full context
  • 📝 Diff View: Compare original commit vs LLM-generated content
  • 🗑️ Filtered Items: Review and restore filtered entries

Quick Start

1. Installation

git clone <repo-url>
cd NC-assestment

# Create and activate virtual environment
python -m venv venv
.\venv\Scripts\Activate.ps1  # Windows PowerShell
# source venv/bin/activate   # macOS/Linux

# Install dependencies
pip install -e ".[dev]"

2. Configuration

copy .env.template .env  # Windows
# cp .env.template .env  # macOS/Linux

Edit .env:

# For OpenAI (default)
OPENAI_API_KEY=sk-your-openai-key

# For NC Gateway (requires BOTH variables)
# NC_API_KEY=sk-nc-xxxxx
# NC_BASE_URL=https://ai-gateway.neuralconcept.com/

3. Run

streamlit run src/app.py

4. Run with Docker (Optional)

Instead of installing dependencies locally, you can use Docker:

# Build and run
docker-compose up --build

# Access the app at http://localhost:8501

Note

Docker & Dependencies: While pyproject.toml is the source of truth for dependencies, this project also includes a requirements.txt (auto-generated) specifically for Docker. The Dockerfile uses requirements.txt to enable layer caching, ensuring that changing source code doesn't trigger a full dependency reinstall.

Model Selection

Model Provider Use Case
gpt-4o OpenAI Default - best quality
gpt-5-nano OpenAI Cheap & fast for high volume
azure-oai-gpt-4.1 NC Gateway* Azure OpenAI
bedrock-claude-sonnet-4 NC Gateway* AWS Bedrock

*NC Gateway models only appear when both NC_API_KEY and NC_BASE_URL are set.

Configuration

YAML Config (config/config.yaml)

llm:
  model: "gpt-4o"
  temperature: 0.3
  max_tokens: 2000

filtering:
  exclude_tests: true
  exclude_ci_cd: true
  exclude_refactoring: true
  exclude_docs: false

Usage Workflow

  1. Setup: Enter repository URL, select refs (from/to), configure filtering
  2. Harvest: Watch commits/PRs extracted and processed through LLM pipeline
  3. Review: Use List/Detail/Diff views to review and edit entries
  4. Export: Preview, translate, download Markdown or host MkDocs site

Development

# Run tests (52 tests)
pytest

# Run with coverage
pytest --cov=src

# Lint
ruff check src/ tests/

Project Structure

NC-assestment/
├── src/
│   ├── services/           # Business logic
│   │   ├── github_service.py   # Git data extraction
│   │   ├── llm_service.py      # LLM operations with guardrails
│   │   ├── database_service.py # SQLite persistence
│   │   └── mkdocs_service.py   # Documentation generation
│   ├── workflow/           # LangGraph orchestration
│   │   ├── nodes.py            # Harvest/Triage/Classify/Draft nodes
│   │   └── graph.py            # Workflow graph definition
│   ├── ui/                 # Streamlit tabs
│   │   ├── setup.py            # Configuration UI
│   │   ├── harvest.py          # Progress monitoring
│   │   ├── review.py           # List/Detail/Diff views
│   │   └── export.py           # Export & translation
│   ├── guardrails.py       # LLM safety: sanitization, moderation
│   ├── config.py           # Configuration management
│   ├── models.py           # Pydantic models
│   └── app.py              # Main Streamlit app
├── config/config.yaml      # Default settings
├── docs/CONFIGURATION.md   # Full configuration guide
├── tests/unit/             # 52 unit tests
└── pyproject.toml

New Features (ideas for the future)

  1. Caching: Cache git commits and PRs to avoid reprocessing, might also cache llm responses or cache the final release notes so I also have user preferences saved for those commits
  2. CI/CD: Add a github action to run the release notes generation and export to mkdocs
  3. Diff in code: Show the diff in code between commits and directly generate release notes by accessing code developments for fine-grained control, also possibility to analize for security vulnerabilities and then flag for clarification
  4. Integration test: Current done manually, add a github action to run the integration test
  5. Session resumption: While the database persists data, Streamlit session state resets on page reload. Add ability to easily resume/select previous sessions from UI.
  6. Clarification: The flags for clarification can be downloaded, possibility to add feature to create directly an issue on github about a specific commit.
  7. Scrape how to contribute page: Add possibility to scrape the how to contribute page and then create accurate LLM prompt for filtering and classification based on the content of the page, which usually address commit strategy

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors