prune

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Jan 27, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DeleteFiles

func DeleteFiles(files []PruneResult) (int, error)

DeleteFiles deletes the specified files and returns the number of files deleted.

Types

type PruneResult

type PruneResult struct {
	Path     string
	ItemType github.ItemType
	Number   int
	State    string
	Owner    string
	Repo     string
}

PruneResult represents a file that can be pruned.

func FindPrunableFiles

func FindPrunableFiles(repoFilter string) ([]PruneResult, error)

FindPrunableFiles walks the gh-md root and returns files that should be pruned. If repoFilter is non-empty (format: "owner/repo"), only files from that repo are included. Prunable files are: - Issues with state == "closed" - Pull requests with state == "merged" or state == "closed" Discussions are never pruned.

func (*PruneResult) RelativePath

func (p *PruneResult) RelativePath() string

RelativePath returns the path relative to the gh-md root for display.

Jump to

Keyboard shortcuts

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