gitClient

package
v0.105.0 Latest Latest
Warning

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

Go to latest
Published: Aug 31, 2024 License: MIT Imports: 12 Imported by: 0

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

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

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