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
CommitInfo objectsList[TagInfo]
List all tags in the repository, sorted by date (newest first).Returns: List of
TagInfo objectsOptional[Tuple[str, str]]
Extract GitHub owner/repo from remote URL.Returns: Tuple of
(owner, repo) or NoneExample
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 numberrelease_date: datetime- Release datecommits: Sequence[CommitInfo]- List of commitscommit_prs: Dict[str, List[PullRequestInfo]]- Commit to PRs mappingpr_index: Dict[int, PullRequestInfo]- PR number to PR info mapping
Changelog objectExample
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
PullRequestInfo or NoneList[PullRequestInfo]
Find pull requests associated with a commit.Parameters:
sha: str- Commit SHA
PullRequestInfoNone
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