report

package
v1.3.2 Latest Latest
Warning

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

Go to latest
Published: Oct 11, 2025 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Overview

Package report defines public types representing the output of a repository scan. Renderers and external tools consume these types to display or persist results.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type RepoState

type RepoState struct {
	ID              string   `json:"id"`
	Path            string   `json:"path"`
	Repo            string   `json:"repo"`
	Branch          string   `json:"branch"`
	UncommitedFiles []string `json:"uncommitedFiles"`
	Ahead           int      `json:"ahead"`
	Behind          int      `json:"behind"`
}

RepoState describes the state of a single Git repository discovered during a scan.

func (*RepoState) IsDirty

func (r *RepoState) IsDirty() bool

IsDirty reports whether the repository has uncommitted changes or is ahead/behind.

type ScanReport

type ScanReport struct {
	Version     int         `json:"version"`
	RepoStates  []RepoState `json:"repoStates"`
	GeneratedAt time.Time   `json:"generatedAt"`
	Warnings    []string    `json:"warnings"`
}

ScanReport aggregates the results of scanning one or more directories for Git repositories and summarizing their status.

func (*ScanReport) DirtyReposCount added in v1.3.0

func (sc *ScanReport) DirtyReposCount() int

DirtyReposCount count all dirty repos based on [IsDirty] function on RepoState struct

Jump to

Keyboard shortcuts

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