{"id":18873151,"url":"https://github.com/barredterra/pretty_release_notes","last_synced_at":"2026-03-10T03:03:53.202Z","repository":{"id":260290398,"uuid":"877307135","full_name":"barredterra/pretty_release_notes","owner":"barredterra","description":"Turn GitHub's auto-generated release notes into human-readable sentences.","archived":false,"fork":false,"pushed_at":"2026-03-05T00:20:22.000Z","size":384,"stargazers_count":30,"open_issues_count":1,"forks_count":2,"subscribers_count":3,"default_branch":"main","last_synced_at":"2026-03-05T06:49:29.836Z","etag":null,"topics":["ai","github","openai","release-automation","release-notes"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/barredterra.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2024-10-23T12:45:42.000Z","updated_at":"2026-03-05T00:19:58.000Z","dependencies_parsed_at":"2025-02-13T01:29:02.031Z","dependency_job_id":"6675fdcc-5b28-4cb3-8bd9-8c189d4be21a","html_url":"https://github.com/barredterra/pretty_release_notes","commit_stats":null,"previous_names":["barredterra/pretty_release_notes"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/barredterra/pretty_release_notes","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/barredterra%2Fpretty_release_notes","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/barredterra%2Fpretty_release_notes/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/barredterra%2Fpretty_release_notes/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/barredterra%2Fpretty_release_notes/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/barredterra","download_url":"https://codeload.github.com/barredterra/pretty_release_notes/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/barredterra%2Fpretty_release_notes/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30322648,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-10T01:36:58.598Z","status":"online","status_checked_at":"2026-03-10T02:00:06.579Z","response_time":106,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ai","github","openai","release-automation","release-notes"],"created_at":"2024-11-08T05:33:57.413Z","updated_at":"2026-03-10T03:03:53.196Z","avatar_url":"https://github.com/barredterra.png","language":"Python","readme":"Turn GitHub's auto-generated release notes into human-readable sentences.\n\nGo from this:\n\n![Original](img/original.png)\n\nTo this:\n\n![Modified](img/modified.png)\n\n## Features\n\n- **AI-Powered Summaries** - Converts technical PR titles into clear, user-friendly sentences\n- **Smart Filtering** - Automatically excludes non-user-facing changes (chore, ci, refactor, test, style)\n- **Revert Detection** - Automatically filters out PRs that were reverted within the same release\n- **Backport Intelligence** - Reuses summaries from original PRs for backports, maintaining consistency\n- **Author \u0026 Reviewer Attribution** - Credits human contributors while excluding bots\n- **Intelligent Caching** - Stores generated summaries to avoid redundant API calls and reduce costs\n- **Grouped Release Notes** - Optional grouping by conventional commit type (Features, Bug Fixes, Performance, etc.)\n- **Multi-Mode Architecture** - Use as CLI tool, Python library, or REST API backend\n- **Rich Context** - Incorporates PR descriptions, linked issues, and code diffs for accurate summaries\n- **Interactive Setup** - Guided configuration with validation and migration from legacy formats\n\n\u003e [!NOTE]\n\u003e The default prompt is geared towards [ERPNext](https://github.com/frappe/erpnext) and the [Frappe Framework](https://github.com/frappe/frappe). If you want to use this for different projects, set your own `prompt_path` in `config.toml`.\n\n## Configuration\n\n### Interactive Setup (Recommended)\n\nThe easiest way to configure the tool is using the interactive setup command:\n\n```bash\npretty-release-notes setup\n```\n\nThis will:\n- Guide you through all configuration options with helpful prompts\n- Show sane defaults for each setting\n- Create the config file at `~/.pretty-release-notes/config.toml`\n\n**First-time migration from .env?** Use the `--migrate-env` flag:\n```bash\npretty-release-notes setup --migrate-env\n```\nThis will read your existing `.env` file and suggest those values as defaults.\n\n### Manual Setup\n\nAlternatively, copy `config.toml.example` to `~/.pretty-release-notes/config.toml` and fill in your credentials:\n\n```bash\n# Create config directory\nmkdir -p ~/.pretty-release-notes\n\n# Copy example config\ncp config.toml.example ~/.pretty-release-notes/config.toml\n\n# Edit with your credentials\nnano ~/.pretty-release-notes/config.toml\n```\n\n### Configuration Format\n\nThe configuration file uses TOML format with sections for GitHub credentials, LLM settings, database caching, and filters. The canonical section name is `[llm]`, while the legacy `[openai]` section is still accepted for backward compatibility. Prefer fully qualified `provider:model` values such as `openai:gpt-4.1`; unqualified model names are still accepted and default to OpenAI for backward compatibility. See [`config.toml.example`](config.toml.example) for the complete structure and all available options.\n\nYou can override the config location using the `--config-path` flag.\n\n## Installation\n\n```bash\n# Clone the repository\ngit clone https://github.com/barredterra/pretty_release_notes\ncd pretty_release_notes\n\n# Create virtual environment and install\npython -m venv env\nsource env/bin/activate\npip install -e .\n```\n\n## Usage\n\n### CLI\n\nAfter installation, you can use the CLI in several ways:\n\n```bash\n# View all commands\npretty-release-notes --help\n\n# Generate release notes\npretty-release-notes generate erpnext v15.38.4  # using owner from config.toml\npretty-release-notes generate --owner alyf-de banking v0.0.1\n\n# Use a custom config file\npretty-release-notes generate --config-path /path/to/config.toml erpnext v15.38.4\n\n# Specify custom comparison range\npretty-release-notes generate erpnext v15.38.4 --previous-tag v15.38.0\n```\n\nExample output:\n\n```markdown\n---- Original ----\n## What's Changed\n* fix: list view and form status not same for purchase order (backport #43690) (backport #43692) by @mergify in https://github.com/frappe/erpnext/pull/43706\n\n\n**Full Changelog**: https://github.com/frappe/erpnext/compare/v15.38.3...v15.38.4\n\n---- Modified ----\n## What's Changed\n* Removes unnecessary decimal precision checks for _per_received_ and _per_billed_ fields in **Purchase Order**, so the list view status and form status remain consistent. https://github.com/frappe/erpnext/pull/43706\n\n\n**Full Changelog**: https://github.com/frappe/erpnext/compare/v15.38.3...v15.38.4\n**Authors**: @rohitwaghchaure\n```\n\n### Library Usage\n\nYou can also use `pretty_release_notes` as a Python library in your own projects:\n\n```python\nfrom pretty_release_notes import ReleaseNotesBuilder\n\n# Build a client with configuration\nclient = (\n    ReleaseNotesBuilder()\n    .with_github_token(\"ghp_your_token\")\n    .with_llm(\"sk_your_key\", model=\"openai:gpt-4.1\")  # or model=\"anthropic:claude-sonnet-4-5\"\n    .with_database(\"sqlite\", enabled=True)\n    .with_filters(\n        exclude_types={\"chore\", \"ci\", \"refactor\"},\n        exclude_labels={\"skip-release-notes\"},\n    )\n    .build()\n)\n\n# Generate release notes\nnotes = client.generate_release_notes(\n    owner=\"frappe\",\n    repo=\"erpnext\",\n    tag=\"v15.38.4\",\n    previous_tag_name=\"v15.38.0\",  # Optional: custom comparison range\n)\nprint(notes)\n\n# Optionally update on GitHub\nclient.update_github_release(\"frappe\", \"erpnext\", \"v15.38.4\", notes)\n```\n\nFor more examples, see [`examples/library_usage.py`](examples/library_usage.py).\n\n### Web API\n\nThe tool can also be run as a REST API server for integration with web frontends.\n\n#### Starting the Server\n\nFirst, install the web dependencies:\n\n```bash\nsource env/bin/activate\npip install -e .[web]\n```\n\nThen start the server:\n\n```bash\n# Using uvicorn directly\npython -m uvicorn pretty_release_notes.web.app:app --host 0.0.0.0 --port 8000\n\n# Or using the provided server script\npython -m pretty_release_notes.web.server\n```\n\nThe API will be available at `http://localhost:8000` with interactive documentation at `http://localhost:8000/docs`.\n\n#### API Endpoints\n\n**Health Check**\n```bash\ncurl http://localhost:8000/health\n```\n\n**Create Release Notes Job**\n```bash\ncurl -X POST http://localhost:8000/generate \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"owner\": \"frappe\",\n    \"repo\": \"erpnext\",\n    \"tag\": \"v15.38.4\",\n    \"previous_tag_name\": \"v15.38.0\",\n    \"github_token\": \"ghp_your_token_here\",\n    \"llm_key\": \"sk-your_key_here\",\n    \"llm_model\": \"openai:gpt-4.1\",\n    \"exclude_types\": [\"chore\", \"ci\", \"refactor\"],\n    \"exclude_labels\": [\"skip-release-notes\"],\n    \"exclude_authors\": [\"dependabot[bot]\"]\n  }'\n```\n\nLegacy `openai_key` and `openai_model` request fields are still accepted for backward compatibility.\n\nResponse:\n```json\n{\n  \"job_id\": \"550e8400-e29b-41d4-a716-446655440000\",\n  \"status\": \"pending\",\n  \"created_at\": \"2025-01-19T10:30:00.000000\"\n}\n```\n\n**Check Job Status**\n```bash\ncurl http://localhost:8000/jobs/{job_id}\n```\n\nResponse:\n```json\n{\n  \"job_id\": \"550e8400-e29b-41d4-a716-446655440000\",\n  \"status\": \"completed\",\n  \"created_at\": \"2025-01-19T10:30:00.000000\",\n  \"completed_at\": \"2025-01-19T10:30:15.000000\",\n  \"result\": \"## What's Changed\\n* Fixed bug...\",\n  \"progress\": [\n    {\n      \"timestamp\": \"2025-01-19T10:30:05.000000\",\n      \"type\": \"success\",\n      \"message\": \"Downloaded PRs in 0.42 seconds.\"\n    }\n  ],\n  \"error\": null\n}\n```\n\n## Authors and Reviewers\n\nThe authors and reviewers of the PRs are added to the release notes.\n\n- An author who reviewed or merged their own PR or backport is not a reviewer.\n- A non-author who reviewed or merged someone else's PR is a reviewer.\n- The author of the original PR is also the author of the backport.\n\n## Backports\n\nWe try to use the same message for backports as for the original PR. For this, we look for `(backport #\u003cnumber\u003e)` _at the end_ of the PR title and check if we have existing messages for that PR in our database. If we do, we use the message for the original PR. If we don't, we create a new message for the backport.\n\nThis means that backports of backports are currently not supported / will get a new message. To get the same message, PRs must be a direct backport of the original PR.\n\n## Contributing\n\nSee [CONTRIBUTING.md](CONTRIBUTING.md) for development setup, testing, code quality tools, and commit conventions.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbarredterra%2Fpretty_release_notes","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbarredterra%2Fpretty_release_notes","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbarredterra%2Fpretty_release_notes/lists"}