Backend

This directory contains the server-side code for the GitHub Release Notes Generator.

Files

  • index.ts - Main entry point for the HTTP API (Hono app)
  • github.ts - GitHub API client for fetching repository data

API Endpoints

POST /api/release-notes

Generates release notes based on GitHub commits.

Request Body:

{ "owner": "string", // GitHub repository owner "repo": "string", // GitHub repository name "from": "string", // Starting point (tag, commit hash, or date) "to": "string", // (Optional) Ending point (defaults to HEAD) "format": "string" // (Optional) Commit format (conventional or simple) }

Response:

{ "title": "string", // Release notes title "date": "string", // Generation date "sections": [ // Categorized sections { "title": "string", // Section title (e.g., "Features", "Bug Fixes") "items": [ // Items in this section { "message": "string", // Commit message "author": "string", // Author name or username "sha": "string", // Commit SHA "url": "string" // Commit URL } ] } ], "rawMarkdown": "string" // Formatted markdown content }

Environment Variables

  • GITHUB_TOKEN - GitHub Personal Access Token with repo scope