Documentation
¶
Overview ¶
Package release provides application use cases for release management.
Package release provides application use cases for release management.
Package release provides application use cases for release management.
Package release provides application use cases for release management.
Index ¶
- type AIGenerateInput
- type AINotesGenerator
- type ApproveReleaseInput
- type ApproveReleaseOutput
- type ApproveReleaseUseCase
- type GenerateNotesInput
- type GenerateNotesOutput
- type GenerateNotesUseCase
- type GetReleaseForApprovalInput
- type GetReleaseForApprovalOutput
- type GetReleaseForApprovalUseCase
- type PlanReleaseInput
- type PlanReleaseOutput
- type PlanReleaseUseCase
- type PluginResult
- type PublishReleaseInput
- type PublishReleaseOutput
- type PublishReleaseUseCase
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AIGenerateInput ¶
type AIGenerateInput struct {
ReleaseContext *release.Release
Tone communication.NoteTone
Audience communication.NoteAudience
}
AIGenerateInput represents input for AI generation.
type AINotesGenerator ¶
type AINotesGenerator interface {
GenerateReleaseNotes(ctx context.Context, input AIGenerateInput) (*communication.ReleaseNotes, error)
}
AINotesGenerator defines the interface for AI-based notes generation.
type ApproveReleaseInput ¶
type ApproveReleaseInput struct {
ReleaseID release.ReleaseID
ApprovedBy string
AutoApprove bool
// EditedNotes contains user-edited release notes. If non-nil, the notes
// will be updated before approval.
EditedNotes *string
}
ApproveReleaseInput represents the input for the ApproveRelease use case.
type ApproveReleaseOutput ¶
type ApproveReleaseOutput struct {
Approved bool
ApprovedBy string
ReleasePlan *release.ReleasePlan
}
ApproveReleaseOutput represents the output of the ApproveRelease use case.
type ApproveReleaseUseCase ¶
type ApproveReleaseUseCase struct {
// contains filtered or unexported fields
}
ApproveReleaseUseCase implements the approve release use case.
func NewApproveReleaseUseCase ¶
func NewApproveReleaseUseCase( releaseRepo release.Repository, eventPublisher release.EventPublisher, ) *ApproveReleaseUseCase
NewApproveReleaseUseCase creates a new ApproveReleaseUseCase.
func (*ApproveReleaseUseCase) Execute ¶
func (uc *ApproveReleaseUseCase) Execute(ctx context.Context, input ApproveReleaseInput) (*ApproveReleaseOutput, error)
Execute executes the approve release use case.
type GenerateNotesInput ¶
type GenerateNotesInput struct {
ReleaseID release.ReleaseID
UseAI bool
Tone communication.NoteTone
Audience communication.NoteAudience
IncludeChangelog bool
RepositoryURL string
}
GenerateNotesInput represents the input for the GenerateNotes use case.
type GenerateNotesOutput ¶
type GenerateNotesOutput struct {
ReleaseNotes *communication.ReleaseNotes
Changelog *communication.Changelog
}
GenerateNotesOutput represents the output of the GenerateNotes use case.
type GenerateNotesUseCase ¶
type GenerateNotesUseCase struct {
// contains filtered or unexported fields
}
GenerateNotesUseCase implements the generate notes use case.
func NewGenerateNotesUseCase ¶
func NewGenerateNotesUseCase( releaseRepo release.Repository, aiGenerator AINotesGenerator, eventPublisher release.EventPublisher, ) *GenerateNotesUseCase
NewGenerateNotesUseCase creates a new GenerateNotesUseCase.
func (*GenerateNotesUseCase) Execute ¶
func (uc *GenerateNotesUseCase) Execute(ctx context.Context, input GenerateNotesInput) (*GenerateNotesOutput, error)
Execute executes the generate notes use case.
type GetReleaseForApprovalInput ¶
GetReleaseForApprovalInput represents input for getting release details.
type GetReleaseForApprovalOutput ¶
type GetReleaseForApprovalOutput struct {
Release *release.Release
Summary release.ReleaseSummary
CanApprove bool
ApprovalMsg string
}
GetReleaseForApprovalOutput represents output with release details for approval.
type GetReleaseForApprovalUseCase ¶
type GetReleaseForApprovalUseCase struct {
// contains filtered or unexported fields
}
GetReleaseForApprovalUseCase retrieves release details for approval review.
func NewGetReleaseForApprovalUseCase ¶
func NewGetReleaseForApprovalUseCase(releaseRepo release.Repository) *GetReleaseForApprovalUseCase
NewGetReleaseForApprovalUseCase creates a new use case.
func (*GetReleaseForApprovalUseCase) Execute ¶
func (uc *GetReleaseForApprovalUseCase) Execute(ctx context.Context, input GetReleaseForApprovalInput) (*GetReleaseForApprovalOutput, error)
Execute retrieves release details for approval.
type PlanReleaseInput ¶
type PlanReleaseInput struct {
RepositoryPath string
Branch string
FromRef string
ToRef string
DryRun bool
TagPrefix string
}
PlanReleaseInput represents the input for the PlanRelease use case.
func (*PlanReleaseInput) Validate ¶
func (i *PlanReleaseInput) Validate() error
Validate validates the PlanReleaseInput.
type PlanReleaseOutput ¶
type PlanReleaseOutput struct {
ReleaseID release.ReleaseID
CurrentVersion version.SemanticVersion
NextVersion version.SemanticVersion
ReleaseType changes.ReleaseType
ChangeSet *changes.ChangeSet
RepositoryName string
Branch string
}
PlanReleaseOutput represents the output of the PlanRelease use case.
type PlanReleaseUseCase ¶
type PlanReleaseUseCase struct {
// contains filtered or unexported fields
}
PlanReleaseUseCase implements the plan release use case.
func NewPlanReleaseUseCase ¶
func NewPlanReleaseUseCase( releaseRepo release.Repository, gitRepo sourcecontrol.GitRepository, versionCalc version.VersionCalculator, eventPublisher release.EventPublisher, ) *PlanReleaseUseCase
NewPlanReleaseUseCase creates a new PlanReleaseUseCase.
func (*PlanReleaseUseCase) Execute ¶
func (uc *PlanReleaseUseCase) Execute(ctx context.Context, input PlanReleaseInput) (*PlanReleaseOutput, error)
Execute executes the plan release use case.
type PluginResult ¶
type PluginResult struct {
PluginName string
Hook integration.Hook
Success bool
Message string
Duration time.Duration
}
PluginResult represents the result of a plugin execution.
type PublishReleaseInput ¶
type PublishReleaseInput struct {
ReleaseID release.ReleaseID
DryRun bool
CreateTag bool
PushTag bool
TagPrefix string
Remote string
}
PublishReleaseInput represents the input for the PublishRelease use case.
func (*PublishReleaseInput) Validate ¶
func (i *PublishReleaseInput) Validate() error
Validate validates the PublishReleaseInput.
type PublishReleaseOutput ¶
type PublishReleaseOutput struct {
TagName string
ReleaseURL string
PluginResults []PluginResult
}
PublishReleaseOutput represents the output of the PublishRelease use case.
type PublishReleaseUseCase ¶
type PublishReleaseUseCase struct {
// contains filtered or unexported fields
}
PublishReleaseUseCase implements the publish release use case.
func NewPublishReleaseUseCase ¶
func NewPublishReleaseUseCase( releaseRepo release.Repository, gitRepo sourcecontrol.GitRepository, pluginExecutor integration.PluginExecutor, eventPublisher release.EventPublisher, ) *PublishReleaseUseCase
NewPublishReleaseUseCase creates a new PublishReleaseUseCase.
func (*PublishReleaseUseCase) Execute ¶
func (uc *PublishReleaseUseCase) Execute(ctx context.Context, input PublishReleaseInput) (*PublishReleaseOutput, error)
Execute executes the publish release use case.