reset

package
v0.5.0-rc.7 Latest Latest
Warning

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

Go to latest
Published: Jun 25, 2026 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Overview

Package reset provides functionality to reset test repositories by wiping releases, tags, and optionally resetting state in the manifest. Supports auto-detection of manifest.yaml/manifest.yml with configurable key.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewCommand

func NewCommand() *cobra.Command

NewCommand creates the reset command.

Types

type Options

type Options struct {
	RepoPath    string // Path to the repository (defaults to current directory)
	ResetState  bool   // Whether to reset state in manifest
	DryRun      bool   // Preview changes without executing
	Push        bool   // Push changes after reset (only applies if ResetState is true)
	ConfigPath  string // Path to manifest file (auto-detected if empty)
	ManifestKey string // Key in manifest file (default: "ci")
}

Options configures the reset operation.

type Resetter

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

Resetter handles repository reset operations.

func New

func New(opts Options) (*Resetter, error)

New creates a new Resetter.

func (*Resetter) Reset

func (r *Resetter) Reset() (*Result, error)

Reset performs the reset operation.

type Result

type Result struct {
	ReleasesDeleted int
	TagsDeleted     int
	StateReset      bool
	Pushed          bool
}

Result contains the results of the reset operation.

Jump to

Keyboard shortcuts

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