gitClient

package
v0.107.8 Latest Latest
Warning

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

Go to latest
Published: Oct 8, 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 committed 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, repoLocalPath, repoURL, userName, 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 CreateBranch

func CreateBranch(repo *git.Repository, branchName string) error

func GitAddWithFilter

func GitAddWithFilter(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, 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