Skip to main content

GitRepository

Interface for working with Git repositories.

Constructor

Path
required
Path to the Git repository directory.
bool
default:"true"
Prefer using GitPython when available, with automatic fallback to the git CLI.

Methods

Iterator[CommitInfo]
Iterate over commits in a given range.
Parameters:
  • commit_range: CommitRange - Range of commits to fetch
Returns: Iterator of CommitInfo objects
List[TagInfo]
List all tags in the repository, sorted by date (newest first).
Returns: List of TagInfo objects
Optional[Tuple[str, str]]
Extract GitHub owner/repo from remote URL.
Returns: Tuple of (owner, repo) or None

Example


CommitRange

Define a range of commits to process.

Constructor

str
Starting ref (tag, commit SHA, or branch). Commits after this ref are included.
str
default:"HEAD"
Ending ref. Commits up to and including this ref are included.
bool
default:"true"
Whether to include merge commits in the output.
int
Maximum number of commits to process.

Example


ChangelogBuilder

Build structured changelogs from commits.

Constructor

BaseSummarizer
AI summarizer for generating enhanced descriptions. Pass None to disable AI.
List[str]
Custom order for changelog sections. Uses default order if not specified.
bool
default:"true"
Whether to include commit scopes in descriptions.
bool
default:"true"
Whether to deduplicate pull requests.

Methods

Changelog
Build a changelog from commits.
Parameters:
  • version: Optional[str] - Version number
  • release_date: datetime - Release date
  • commits: Sequence[CommitInfo] - List of commits
  • commit_prs: Dict[str, List[PullRequestInfo]] - Commit to PRs mapping
  • pr_index: Dict[int, PullRequestInfo] - PR number to PR info mapping
Returns: Changelog object

Example


Formatters

Render changelogs in different formats.

Markdown

HTML

Text


GitHubClient

Interface with GitHub’s API.

Constructor

GitHubSettings
required
GitHub configuration including owner, repo, and token.

Methods

Optional[PullRequestInfo]
Fetch pull request by number.
Parameters:
  • number: int - Pull request number
Returns: PullRequestInfo or None
List[PullRequestInfo]
Find pull requests associated with a commit.
Parameters:
  • sha: str - Commit SHA
Returns: List of PullRequestInfo
None
Close the GitHub client and release resources.

Example


PromptEngineeredSummarizer

AI-powered summarization of commits.

Constructor

str
required
OpenAI or OpenRouter API key.
str
default:"gpt-4o-mini"
AI model to use for summarization.
str
Custom API base URL (for OpenRouter: https://openrouter.ai/api/v1).
Path
Path to cache file for storing summaries.
str
Domain context for the AI (e.g., “software release notes”).
List[str]
Expert perspectives to consider (e.g., [“Product Manager”, “Tech Lead”]).
str
default:"simple"
RAG backend: “simple” (keyword) or “chroma” (vector).

Example


Data models

CommitInfo

Changelog

ChangelogSection

PullRequestInfo


Complete example


Next steps

Git client

Detailed Git client documentation

Changelog builder

Changelog building API

Formatters

Output formatting reference

Examples

See Python API in action