Documentation
¶
Index ¶
- type ChangelogEntry
- type ChangelogSection
- type EnhancedLocalSummarizer
- func (s *EnhancedLocalSummarizer) Changes(sinceRef, untilRef string) ([]change.Change, error)
- func (s *EnhancedLocalSummarizer) ChangesURL(sinceRef, untilRef string) string
- func (s *EnhancedLocalSummarizer) LastRelease() (*release.Release, error)
- func (s *EnhancedLocalSummarizer) ReferenceURL(tag string) string
- func (s *EnhancedLocalSummarizer) Release(ref string) (*release.Release, error)
- type GenerateChangelogRequest
- type GenerateChangelogResponse
- type GenerateChangelogTool
- type GitCommit
- type GitInterface
- type GitRange
- type GitTag
- type GitWrapper
- func (g *GitWrapper) CommitsBetween(cfg GitRange) ([]string, error)
- func (g *GitWrapper) FirstCommit() (string, error)
- func (g *GitWrapper) HeadTag() (string, error)
- func (g *GitWrapper) HeadTagOrCommit() (string, error)
- func (g *GitWrapper) RemoteURL() (string, error)
- func (g *GitWrapper) SearchForTag(tagRef string) (*GitTag, error)
- func (g *GitWrapper) TagsFromLocal() ([]GitTag, error)
- type LocalGitSummarizer
- func (s *LocalGitSummarizer) Changes(sinceRef, untilRef string) ([]change.Change, error)
- func (s *LocalGitSummarizer) ChangesURL(sinceRef, untilRef string) string
- func (s *LocalGitSummarizer) LastRelease() (*release.Release, error)
- func (s *LocalGitSummarizer) ReferenceURL(tag string) string
- func (s *LocalGitSummarizer) Release(ref string) (*release.Release, error)
- type VersionInfo
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ChangelogEntry ¶
type ChangelogEntry struct { Type string `json:"type"` Title string `json:"title"` Description string `json:"description,omitempty"` Author string `json:"author,omitempty"` PRNumber int `json:"pr_number,omitempty"` IssueNumber int `json:"issue_number,omitempty"` CommitHash string `json:"commit_hash,omitempty"` Labels []string `json:"labels,omitempty"` }
ChangelogEntry represents a single change in the changelog
type ChangelogSection ¶
type ChangelogSection struct { Type string `json:"type"` Title string `json:"title"` Changes []ChangelogEntry `json:"changes"` }
ChangelogSection represents a section of changes grouped by type
type EnhancedLocalSummarizer ¶
type EnhancedLocalSummarizer struct {
// contains filtered or unexported fields
}
EnhancedLocalSummarizer is a local git summarizer with optional GitHub metadata enhancement
func (*EnhancedLocalSummarizer) Changes ¶
func (s *EnhancedLocalSummarizer) Changes(sinceRef, untilRef string) ([]change.Change, error)
Changes returns all changes between two references using git log with optional GitHub enhancement
func (*EnhancedLocalSummarizer) ChangesURL ¶
func (s *EnhancedLocalSummarizer) ChangesURL(sinceRef, untilRef string) string
ChangesURL returns the GitHub comparison URL if available
func (*EnhancedLocalSummarizer) LastRelease ¶
func (s *EnhancedLocalSummarizer) LastRelease() (*release.Release, error)
LastRelease returns the last git tag as a release
func (*EnhancedLocalSummarizer) ReferenceURL ¶
func (s *EnhancedLocalSummarizer) ReferenceURL(tag string) string
ReferenceURL returns the GitHub URL for the reference if available
type GenerateChangelogRequest ¶
type GenerateChangelogRequest struct { RepositoryPath string `json:"repository_path"` SinceTag string `json:"since_tag,omitempty"` UntilTag string `json:"until_tag,omitempty"` OutputFormat string `json:"output_format"` SpeculateNextVersion bool `json:"speculate_next_version"` EnableGitHubIntegration bool `json:"enable_github_integration"` Title string `json:"title"` OutputFile string `json:"output_file,omitempty"` TimeoutMinutes int `json:"timeout_minutes"` }
GenerateChangelogRequest represents the input parameters for changelog generation
type GenerateChangelogResponse ¶
type GenerateChangelogResponse struct { Content string `json:"content"` Format string `json:"format"` VersionRange string `json:"version_range"` ChangeCount int `json:"change_count"` CurrentVersion string `json:"current_version,omitempty"` NextVersion string `json:"next_version,omitempty"` RepositoryURL string `json:"repository_url,omitempty"` ChangesURL string `json:"changes_url,omitempty"` OutputFile string `json:"output_file,omitempty"` GenerationTime time.Time `json:"generation_time"` RepositoryPath string `json:"repository_path"` }
GenerateChangelogResponse represents the output from changelog generation
type GenerateChangelogTool ¶
type GenerateChangelogTool struct{}
GenerateChangelogTool implements changelog generation using Anchore Chronicle
func (*GenerateChangelogTool) Definition ¶
func (t *GenerateChangelogTool) Definition() mcp.Tool
Definition returns the tool's definition for MCP registration
func (*GenerateChangelogTool) Execute ¶
func (t *GenerateChangelogTool) Execute(ctx context.Context, logger *logrus.Logger, cache *sync.Map, args map[string]any) (*mcp.CallToolResult, error)
Execute executes the generate_changelog tool
func (*GenerateChangelogTool) ProvideExtendedInfo ¶
func (t *GenerateChangelogTool) ProvideExtendedInfo() *tools.ExtendedHelp
ProvideExtendedInfo provides detailed usage information for the generate_changelog tool
type GitInterface ¶
type GitInterface interface { FirstCommit() (string, error) HeadTagOrCommit() (string, error) HeadTag() (string, error) RemoteURL() (string, error) SearchForTag(tagRef string) (*GitTag, error) TagsFromLocal() ([]GitTag, error) CommitsBetween(cfg GitRange) ([]string, error) }
GitInterface is our own git interface that matches Chronicle's expectations but uses publicly accessible packages
func NewGitWrapper ¶
func NewGitWrapper(repoPath string) (GitInterface, error)
NewGitWrapper creates a new git wrapper for the given repository path
type GitWrapper ¶
type GitWrapper struct {
// contains filtered or unexported fields
}
GitWrapper implements GitInterface using go-git
func (*GitWrapper) CommitsBetween ¶
func (g *GitWrapper) CommitsBetween(cfg GitRange) ([]string, error)
CommitsBetween returns commits between two references
func (*GitWrapper) FirstCommit ¶
func (g *GitWrapper) FirstCommit() (string, error)
FirstCommit returns the first commit in the repository
func (*GitWrapper) HeadTag ¶
func (g *GitWrapper) HeadTag() (string, error)
HeadTag returns the tag at HEAD if it exists
func (*GitWrapper) HeadTagOrCommit ¶
func (g *GitWrapper) HeadTagOrCommit() (string, error)
HeadTagOrCommit returns the current HEAD tag if it exists, otherwise the commit hash
func (*GitWrapper) RemoteURL ¶
func (g *GitWrapper) RemoteURL() (string, error)
RemoteURL returns the remote URL for origin
func (*GitWrapper) SearchForTag ¶
func (g *GitWrapper) SearchForTag(tagRef string) (*GitTag, error)
SearchForTag searches for a specific tag
func (*GitWrapper) TagsFromLocal ¶
func (g *GitWrapper) TagsFromLocal() ([]GitTag, error)
TagsFromLocal returns all local tags
type LocalGitSummarizer ¶
type LocalGitSummarizer struct {
// contains filtered or unexported fields
}
LocalGitSummarizer implements Chronicle's Summarizer interface for local git repositories
func (*LocalGitSummarizer) Changes ¶
func (s *LocalGitSummarizer) Changes(sinceRef, untilRef string) ([]change.Change, error)
Changes returns all changes between two references using git log
func (*LocalGitSummarizer) ChangesURL ¶
func (s *LocalGitSummarizer) ChangesURL(sinceRef, untilRef string) string
ChangesURL returns GitHub comparison URL if the remote is GitHub, otherwise empty
func (*LocalGitSummarizer) LastRelease ¶
func (s *LocalGitSummarizer) LastRelease() (*release.Release, error)
LastRelease returns the last git tag as a release
func (*LocalGitSummarizer) ReferenceURL ¶
func (s *LocalGitSummarizer) ReferenceURL(tag string) string
ReferenceURL returns GitHub URL if the remote is GitHub, otherwise empty
type VersionInfo ¶
type VersionInfo struct { Current string `json:"current"` Next string `json:"next,omitempty"` Range string `json:"range"` }
VersionInfo represents version information for the changelog