vcs

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2026 License: MIT Imports: 14 Imported by: 0

Documentation

Overview

Package vcs provides version control system commands (git, gh, gt).

Index

Constants

View Source
const (
	GitStaged     = "staged"
	GitModified   = "modified"
	GitUntracked  = "untracked"
	GitDeleted    = "deleted"
	GitConflicted = "conflicted"
)

Git status codes

Variables

This section is empty.

Functions

This section is empty.

Types

type GhCheckRun

type GhCheckRun struct {
	Name       string `json:"name"`
	Status     string `json:"status"`
	Conclusion string `json:"conclusion"`
}

type GhIssue

type GhIssue struct {
	Number int    `json:"number"`
	Title  string `json:"title"`
	Author string `json:"author"`
	State  string `json:"state"`
}

type GhPR

type GhPR struct {
	Number      int    `json:"number"`
	Title       string `json:"title"`
	Author      string `json:"author"`
	HeadRefName string `json:"headRefName"`
	State       string `json:"state"`
}

type GhPRFile

type GhPRFile struct {
	Path string `json:"path"`
}

type GhPRView

type GhPRView struct {
	Number            int          `json:"number"`
	Title             string       `json:"title"`
	Author            string       `json:"author"`
	State             string       `json:"state"`
	HeadRefName       string       `json:"headRefName"`
	BaseRefName       string       `json:"baseRefName"`
	Additions         int          `json:"additions"`
	Deletions         int          `json:"deletions"`
	ChangedFiles      int          `json:"changedFiles"`
	Mergeable         string       `json:"mergeable"`
	MergeStateStatus  string       `json:"mergeStateStatus"`
	Commits           int          `json:"commits"`
	Files             []GhPRFile   `json:"files"`
	StatusCheckRollup []GhCheckRun `json:"statusCheckRollup"`
}

type GhRelease

type GhRelease struct {
	TagName      string `json:"tagName"`
	Name         string `json:"name"`
	CreatedAt    string `json:"createdAt"`
	IsDraft      bool   `json:"isDraft"`
	IsPrerelease bool   `json:"isPrerelease"`
}

type GhRun

type GhRun struct {
	DatabaseId   int    `json:"databaseId"`
	DisplayTitle string `json:"displayTitle"`
	Status       string `json:"status"`
	Conclusion   string `json:"conclusion"`
	CreatedAt    string `json:"createdAt"`
	Event        string `json:"event"`
}

type GitFile

type GitFile struct {
	Path string
	Code string
}

GitFile represents a file in git status

type GitStatus

type GitStatus struct {
	Branch         string
	TrackingBranch string // e.g., "origin/main"
	Ahead          int
	Behind         int
	Staged         []GitFile
	Modified       []GitFile
	Untracked      []GitFile
	Conflicted     []GitFile
}

GitStatus represents parsed git status output

Jump to

Keyboard shortcuts

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