ui

package
v1.2.2 Latest Latest
Warning

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

Go to latest
Published: Dec 12, 2025 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package ui provides terminal user interface components for ReleasePilot.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ApprovalModel

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

ApprovalModel is the Bubble Tea model for the approval TUI.

func NewApprovalModel

func NewApprovalModel(summary ReleaseSummary) ApprovalModel

NewApprovalModel creates a new approval model.

func (ApprovalModel) Init

func (m ApprovalModel) Init() tea.Cmd

Init implements tea.Model.

func (ApprovalModel) Result

func (m ApprovalModel) Result() ApprovalResult

Result returns the approval result.

func (ApprovalModel) Update

func (m ApprovalModel) Update(msg tea.Msg) (tea.Model, tea.Cmd)

Update implements tea.Model.

func (ApprovalModel) View

func (m ApprovalModel) View() string

View implements tea.Model.

type ApprovalResult

type ApprovalResult int

ApprovalResult represents the result of an approval interaction.

const (
	// ApprovalPending means no decision has been made yet.
	ApprovalPending ApprovalResult = iota
	// ApprovalAccepted means the user approved the release.
	ApprovalAccepted
	// ApprovalRejected means the user rejected the release.
	ApprovalRejected
	// ApprovalEdit means the user wants to edit the release notes.
	ApprovalEdit
)

func RunApprovalTUI

func RunApprovalTUI(summary ReleaseSummary) (ApprovalResult, error)

RunApprovalTUI runs the approval TUI and returns the result.

type ReleaseSummary

type ReleaseSummary struct {
	ReleaseID      string
	CurrentVersion string
	NextVersion    string
	ReleaseType    string
	CommitCount    int
	Branch         string
	BreakingCount  int
	FeatureCount   int
	FixCount       int
	PerfCount      int
	OtherCount     int
	ReleaseNotes   string
	Plugins        []string
}

ReleaseSummary contains the data to display in the approval UI.

Jump to

Keyboard shortcuts

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