gitClient

package
v0.4.8 Latest Latest
Warning

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

Go to latest
Published: Mar 21, 2024 License: MIT Imports: 12 Imported by: 2

Documentation

Overview

Copyright (C) 2021-2023, Kubefirst

This program is licensed under MIT. See the LICENSE file for more details.

This program is licensed under MIT. See the LICENSE file for more details.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddRemote

func AddRemote(newGitRemoteURL, remoteName string, repo *git.Repository) error

func AppendFile

func AppendFile(cloudType string, reponame string, filename string) bool

AppendFile verify if a file must be appended to commited gitops meant to help exclude undesired state files to be pushed to gitops

func Clone

func Clone(gitRef, repoLocalPath, repoURL string) (*git.Repository, error)

func ClonePrivateRepo added in v0.3.10

func ClonePrivateRepo(gitRef string, repoLocalPath string, repoURL string, userName string, token string) (*git.Repository, error)

func CloneRefSetMain

func CloneRefSetMain(gitRef, repoLocalPath, repoURL string) (*git.Repository, error)

func Commit

func Commit(repo *git.Repository, commitMsg string) error

func GitAddWithFilter

func GitAddWithFilter(cloudType string, reponame string, w *git.Worktree) error

GitAddWithFilter Check workdir for files to commit filter out the undersired ones based on context

func Pull added in v0.1.32

func Pull(repo *git.Repository, remote string, branch string) error

func SetRefToMainBranch

func SetRefToMainBranch(repo *git.Repository) (*git.Repository, error)

SetRefToMainBranch sets the provided gitRef (branch or tag) to the main branch

Types

This section is empty.

Jump to

Keyboard shortcuts

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