git

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2024 License: GPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Commit

type Commit struct {
	Hash    string
	Message string

	PullRequest *PullRequest
}

type PullRequest

type PullRequest struct {
	ID          int
	Title       string
	Description string
}

type Releases

type Releases struct {
	Latest *Tag
	Stable *Tag
}

type Repository

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

func CloneRepo

func CloneRepo(ctx context.Context, logger *slog.Logger, cloneURL, branch string, auth transport.AuthMethod) (*Repository, error)

func (*Repository) Checkout

func (r *Repository) Checkout(_ context.Context, branch string) error

func (*Repository) Commit

func (r *Repository) Commit(_ context.Context, message string) (Commit, error)

func (*Repository) DeleteBranch

func (r *Repository) DeleteBranch(ctx context.Context, branch string) error

func (*Repository) ForcePush

func (r *Repository) ForcePush(ctx context.Context, branch string) error

func (*Repository) HasChangesWithRemote

func (r *Repository) HasChangesWithRemote(ctx context.Context, branch string) (bool, error)

func (*Repository) UpdateFile

func (r *Repository) UpdateFile(_ context.Context, path string, create bool, updaters []updater.Updater) error

type Tag

type Tag struct {
	Hash string
	Name string
}

Jump to

Keyboard shortcuts

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