services

package
v1.4.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 16, 2025 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CommitService

type CommitService struct {
	// contains filtered or unexported fields
}

func NewCommitService

func NewCommitService(
	git ports.GitService,
	ai ports.CommitSummarizer,
	ticketManager ports.TickerManager,
	vcsClient ports.VCSClient,
	cfg *config.Config,
	trans *i18n.Translations) *CommitService

func (*CommitService) GenerateSuggestions

func (s *CommitService) GenerateSuggestions(ctx context.Context, count int, progress func(string)) ([]models.CommitSuggestion, error)

func (*CommitService) GenerateSuggestionsWithIssue added in v1.4.0

func (s *CommitService) GenerateSuggestionsWithIssue(ctx context.Context, count int, issueNumber int, progress func(string)) ([]models.CommitSuggestion, error)

type MockAIProvider added in v1.4.0

type MockAIProvider struct {
	mock.Mock
}

func (*MockAIProvider) GenerateSuggestions added in v1.4.0

func (m *MockAIProvider) GenerateSuggestions(ctx context.Context, info models.CommitInfo, count int) ([]models.CommitSuggestion, error)

type MockGitService added in v1.4.0

type MockGitService struct {
	mock.Mock
}

func (*MockGitService) AddFileToStaging added in v1.4.0

func (m *MockGitService) AddFileToStaging(ctx context.Context, file string) error

func (*MockGitService) CreateCommit added in v1.4.0

func (m *MockGitService) CreateCommit(ctx context.Context, message string) error

func (*MockGitService) CreateTag added in v1.4.0

func (m *MockGitService) CreateTag(ctx context.Context, version, message string) error

func (*MockGitService) GetChangedFiles added in v1.4.0

func (m *MockGitService) GetChangedFiles(ctx context.Context) ([]models.GitChange, error)

func (*MockGitService) GetCommitCount added in v1.4.0

func (m *MockGitService) GetCommitCount(ctx context.Context) (int, error)

func (*MockGitService) GetCommitsBetweenTags added in v1.4.0

func (m *MockGitService) GetCommitsBetweenTags(ctx context.Context, fromTag, toTag string) ([]models.Commit, error)

func (*MockGitService) GetCommitsSinceTag added in v1.4.0

func (m *MockGitService) GetCommitsSinceTag(ctx context.Context, tag string) ([]models.Commit, error)

func (*MockGitService) GetCurrentBranch added in v1.4.0

func (m *MockGitService) GetCurrentBranch(ctx context.Context) (string, error)

func (*MockGitService) GetDiff added in v1.4.0

func (m *MockGitService) GetDiff(ctx context.Context) (string, error)

func (*MockGitService) GetLastTag added in v1.4.0

func (m *MockGitService) GetLastTag(ctx context.Context) (string, error)

func (*MockGitService) GetRecentCommitMessages added in v1.4.0

func (m *MockGitService) GetRecentCommitMessages(ctx context.Context, count int) (string, error)

func (*MockGitService) GetRepoInfo added in v1.4.0

func (m *MockGitService) GetRepoInfo(ctx context.Context) (string, string, string, error)

func (*MockGitService) GetTagDate added in v1.4.0

func (m *MockGitService) GetTagDate(ctx context.Context, tag string) (string, error)

func (*MockGitService) HasStagedChanges added in v1.4.0

func (m *MockGitService) HasStagedChanges(ctx context.Context) bool

func (*MockGitService) PushTag added in v1.4.0

func (m *MockGitService) PushTag(ctx context.Context, version string) error

func (*MockGitService) StageAllChanges added in v1.4.0

func (m *MockGitService) StageAllChanges(ctx context.Context) error

type MockJiraService added in v1.4.0

type MockJiraService struct {
	mock.Mock
}

func (*MockJiraService) GetTicketInfo added in v1.4.0

func (m *MockJiraService) GetTicketInfo(ticketID string) (*models.TicketInfo, error)

type MockPRSummarizer added in v1.4.0

type MockPRSummarizer struct {
	mock.Mock
}

func (*MockPRSummarizer) GeneratePRSummary added in v1.4.0

func (m *MockPRSummarizer) GeneratePRSummary(ctx context.Context, prompt string) (models.PRSummary, error)

type MockReleaseNotesGenerator added in v1.4.0

type MockReleaseNotesGenerator struct {
	mock.Mock
}

func (*MockReleaseNotesGenerator) GenerateNotes added in v1.4.0

func (m *MockReleaseNotesGenerator) GenerateNotes(ctx context.Context, release *models.Release) (*models.ReleaseNotes, error)

type MockVCSClient added in v1.4.0

type MockVCSClient struct {
	mock.Mock
}

func (*MockVCSClient) AddLabelsToPR added in v1.4.0

func (m *MockVCSClient) AddLabelsToPR(ctx context.Context, prNumber int, labels []string) error

func (*MockVCSClient) CreateLabel added in v1.4.0

func (m *MockVCSClient) CreateLabel(ctx context.Context, name, color, description string) error

func (*MockVCSClient) CreateRelease added in v1.4.0

func (m *MockVCSClient) CreateRelease(ctx context.Context, release *models.Release, notes *models.ReleaseNotes, draft bool) error

func (*MockVCSClient) GetClosedIssuesBetweenTags added in v1.4.0

func (m *MockVCSClient) GetClosedIssuesBetweenTags(ctx context.Context, previousTag, currentTag string) ([]models.Issue, error)

func (*MockVCSClient) GetContributorsBetweenTags added in v1.4.0

func (m *MockVCSClient) GetContributorsBetweenTags(ctx context.Context, previousTag, currentTag string) ([]string, error)

func (*MockVCSClient) GetFileAtTag added in v1.4.0

func (m *MockVCSClient) GetFileAtTag(ctx context.Context, tag, filepath string) (string, error)

func (*MockVCSClient) GetFileStatsBetweenTags added in v1.4.0

func (m *MockVCSClient) GetFileStatsBetweenTags(ctx context.Context, previousTag, currentTag string) (*models.FileStatistics, error)

func (*MockVCSClient) GetIssue added in v1.4.0

func (m *MockVCSClient) GetIssue(ctx context.Context, issueNumber int) (*models.Issue, error)

func (*MockVCSClient) GetMergedPRsBetweenTags added in v1.4.0

func (m *MockVCSClient) GetMergedPRsBetweenTags(ctx context.Context, previousTag, currentTag string) ([]models.PullRequest, error)

func (*MockVCSClient) GetPR added in v1.4.0

func (m *MockVCSClient) GetPR(ctx context.Context, prNumber int) (models.PRData, error)

func (*MockVCSClient) GetPRIssues added in v1.4.0

func (m *MockVCSClient) GetPRIssues(ctx context.Context, branchName string, commits []string, prDescription string) ([]models.Issue, error)

func (*MockVCSClient) GetRelease added in v1.4.0

func (m *MockVCSClient) GetRelease(ctx context.Context, version string) (*models.VCSRelease, error)

func (*MockVCSClient) GetRepoLabels added in v1.4.0

func (m *MockVCSClient) GetRepoLabels(ctx context.Context) ([]string, error)

func (*MockVCSClient) UpdateIssueChecklist added in v1.4.0

func (m *MockVCSClient) UpdateIssueChecklist(ctx context.Context, issueNumber int, indices []int) error

func (*MockVCSClient) UpdatePR added in v1.4.0

func (m *MockVCSClient) UpdatePR(ctx context.Context, prNumber int, summary models.PRSummary) error

func (*MockVCSClient) UpdateRelease added in v1.4.0

func (m *MockVCSClient) UpdateRelease(ctx context.Context, version, body string) error

type PRService added in v1.2.0

type PRService struct {
	// contains filtered or unexported fields
}

func NewPRService added in v1.2.0

func NewPRService(vcsClient ports.VCSClient, aiService ports.PRSummarizer, trans *i18n.Translations,
	cfg *config.Config) *PRService

func (*PRService) SummarizePR added in v1.2.0

func (s *PRService) SummarizePR(ctx context.Context, prNumber int, progress func(string)) (models.PRSummary, error)

type ReleaseService added in v1.3.0

type ReleaseService struct {
	// contains filtered or unexported fields
}

func NewReleaseService added in v1.3.0

func NewReleaseService(
	git ports.GitService,
	vcsClient ports.VCSClient,
	notesGen ports.ReleaseNotesGenerator,
	trans *i18n.Translations,
	config *config.Config,
) *ReleaseService

func (*ReleaseService) AnalyzeNextRelease added in v1.3.0

func (s *ReleaseService) AnalyzeNextRelease(ctx context.Context) (*models.Release, error)

func (*ReleaseService) CommitChangelog added in v1.4.0

func (s *ReleaseService) CommitChangelog(ctx context.Context, version string) error

func (*ReleaseService) CreateTag added in v1.3.0

func (s *ReleaseService) CreateTag(ctx context.Context, version, message string) error

func (*ReleaseService) EnrichReleaseContext added in v1.4.0

func (s *ReleaseService) EnrichReleaseContext(ctx context.Context, release *models.Release) error

func (*ReleaseService) GenerateReleaseNotes added in v1.3.0

func (s *ReleaseService) GenerateReleaseNotes(ctx context.Context, release *models.Release) (*models.ReleaseNotes, error)

func (*ReleaseService) GetRelease added in v1.4.0

func (s *ReleaseService) GetRelease(ctx context.Context, version string) (*models.VCSRelease, error)

func (*ReleaseService) PublishRelease added in v1.3.0

func (s *ReleaseService) PublishRelease(ctx context.Context, release *models.Release, notes *models.ReleaseNotes, draft bool) error

func (*ReleaseService) PushTag added in v1.3.0

func (s *ReleaseService) PushTag(ctx context.Context, version string) error

func (*ReleaseService) UpdateAppVersion added in v1.4.0

func (s *ReleaseService) UpdateAppVersion(version string) error

func (*ReleaseService) UpdateLocalChangelog added in v1.4.0

func (s *ReleaseService) UpdateLocalChangelog(release *models.Release, notes *models.ReleaseNotes) error

func (*ReleaseService) UpdateRelease added in v1.4.0

func (s *ReleaseService) UpdateRelease(ctx context.Context, version, body string) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL