Documentation
¶
Overview ¶
Package actions provides mutating operations for release preparation.
Index ¶
- type Action
- type ChangelogAction
- func (a *ChangelogAction) Apply(dir string, proposals []Proposal) Result
- func (a *ChangelogAction) Generate(dir string) error
- func (a *ChangelogAction) Name() string
- func (a *ChangelogAction) ParseCommits(dir string, since string, format string) (string, error)
- func (a *ChangelogAction) Propose(dir string, opts Options) ([]Proposal, error)
- func (a *ChangelogAction) Run(dir string, opts Options) Result
- func (a *ChangelogAction) Validate(dir string) error
- type Options
- type Proposal
- type ReadmeAction
- type Result
- type RoadmapAction
- func (a *RoadmapAction) Apply(dir string, proposals []Proposal) Result
- func (a *RoadmapAction) Generate(dir string) error
- func (a *RoadmapAction) Name() string
- func (a *RoadmapAction) Propose(dir string, opts Options) ([]Proposal, error)
- func (a *RoadmapAction) Run(dir string, opts Options) Result
- func (a *RoadmapAction) Stats(dir string) (string, error)
- func (a *RoadmapAction) Validate(dir string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Action ¶
type Action interface {
// Name returns the action name.
Name() string
// Run executes the action directly (non-interactive).
Run(dir string, opts Options) Result
// Propose generates proposals for interactive mode.
Propose(dir string, opts Options) ([]Proposal, error)
// Apply applies approved proposals.
Apply(dir string, proposals []Proposal) Result
}
Action is the interface for mutating operations.
type ChangelogAction ¶
type ChangelogAction struct{}
ChangelogAction generates and updates changelogs using schangelog.
func (*ChangelogAction) Apply ¶
func (a *ChangelogAction) Apply(dir string, proposals []Proposal) Result
Apply applies approved proposals.
func (*ChangelogAction) Generate ¶
func (a *ChangelogAction) Generate(dir string) error
Generate runs schangelog generate to create CHANGELOG.md.
func (*ChangelogAction) Name ¶
func (a *ChangelogAction) Name() string
Name returns the action name.
func (*ChangelogAction) ParseCommits ¶
ParseCommits runs schangelog parse-commits and returns the output.
func (*ChangelogAction) Propose ¶
func (a *ChangelogAction) Propose(dir string, opts Options) ([]Proposal, error)
Propose generates proposals for interactive mode.
func (*ChangelogAction) Run ¶
func (a *ChangelogAction) Run(dir string, opts Options) Result
Run executes the changelog action directly.
func (*ChangelogAction) Validate ¶
func (a *ChangelogAction) Validate(dir string) error
Validate runs schangelog validate on CHANGELOG.json.
type Options ¶
type Options struct {
DryRun bool // Don't actually make changes
Interactive bool // Enable interactive mode
Version string // Target version (for release)
Since string // Since tag (for changelog)
Verbose bool // Show detailed output
Config *config.Config // Configuration
}
Options configures action behavior.
func DefaultOptions ¶
func DefaultOptions() Options
DefaultOptions returns the default action options.
type Proposal ¶
type Proposal struct {
Description string // Human-readable description
FilePath string // File to modify
OldContent string // Current content (for diff)
NewContent string // Proposed new content
Metadata map[string]string // Additional context
}
Proposal represents a proposed change for user approval.
type ReadmeAction ¶
type ReadmeAction struct{}
ReadmeAction updates README badges and version references.
func (*ReadmeAction) Apply ¶
func (a *ReadmeAction) Apply(dir string, proposals []Proposal) Result
Apply applies approved proposals.
type Result ¶
type Result struct {
Name string
Success bool
Output string
Error error
Skipped bool
Reason string
}
Result represents the result of an action.
type RoadmapAction ¶
type RoadmapAction struct{}
RoadmapAction generates and updates roadmaps using sroadmap.
func (*RoadmapAction) Apply ¶
func (a *RoadmapAction) Apply(dir string, proposals []Proposal) Result
Apply applies approved proposals.
func (*RoadmapAction) Generate ¶
func (a *RoadmapAction) Generate(dir string) error
Generate runs sroadmap generate to create ROADMAP.md.
func (*RoadmapAction) Propose ¶
func (a *RoadmapAction) Propose(dir string, opts Options) ([]Proposal, error)
Propose generates proposals for interactive mode.
func (*RoadmapAction) Run ¶
func (a *RoadmapAction) Run(dir string, opts Options) Result
Run executes the roadmap action directly.
func (*RoadmapAction) Stats ¶
func (a *RoadmapAction) Stats(dir string) (string, error)
Stats returns roadmap statistics.
func (*RoadmapAction) Validate ¶
func (a *RoadmapAction) Validate(dir string) error
Validate runs sroadmap validate on ROADMAP.json.