internal

package
v0.0.0-...-d885a4b Latest Latest
Warning

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

Go to latest
Published: Mar 4, 2025 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// Config global gitlab config
	Config      *gitlabConfig
	MainConfig  *mainConfig
	LabDir      string
	ConfigPath  string
	ProjectPath string
)

Functions

func Clone

func Clone(gitURL, path string) error

Clone git clone the gitlab project

func CurrentBranch

func CurrentBranch() string

CurrentGitRepo return the current branch

func CurrentGitRepo

func CurrentGitRepo() (string, error)

CurrentGitRepo return the GitRepo path

func CurrentRemote

func CurrentRemote(branch string) string

CurrentGitRepo return the current branch ref remote

func DoTrace

func DoTrace(client *gitlab.Client, pid interface{}, job *gitlab.Job, tailLine int64) error

func Fetch

func Fetch(path string) error

func FuzzyFinder

func FuzzyFinder(lines []string) (filtered string)

FuzzyFinder : fuzzy finder content

func FuzzyLine

func FuzzyLine(filePath string) string

FuzzyLine : fuzzy finder file line

func FuzzyLines

func FuzzyLines(filePath string) []string

FuzzyLine : fuzzy finder file lines

func FuzzyMultiFinder

func FuzzyMultiFinder(lines []string) (filtered []string)

FuzzyMultiFinder : fuzzy finder multiple content

func GitCommand

func GitCommand(args ...string) (string, error)

func IsRunning

func IsRunning(status string) bool

IsRunning check job status

func NewClient

func NewClient() *gitlab.Client

func Projects

func Projects(syncAll bool) []string

Projects will return all projects path with namespace

func RemoteURL

func RemoteURL(remote string) string

func SetGitConfig

func SetGitConfig(key, value, path string) error

func Setup

func Setup()

func SetupConfig

func SetupConfig()

func SymbolicRef

func SymbolicRef(ref string, short bool) (string, error)

SymbolicRef return the ref branch

func TraceRunningJobs

func TraceRunningJobs(client *gitlab.Client, pid interface{}, jobs []*gitlab.Job, tailLine int64) bool

func TransferGitURLToProject

func TransferGitURLToProject(gitURL string) string

TransferGitURLToProject example: git@gitlab.com/Ackerr:lab.git -> Ackerr/lab https://gitlab.com/Ackerr/lab.git -> Ackerr/lab

func TransferGitURLToURL

func TransferGitURLToURL(gitURL string) string

TransferGitURLToURL example: git@github.com/Ackerr:lab.git -> https://github.com/Ackerr/lab https://github.com/Ackerr/lab.git -> https://github.com/Ackerr/lab

Types

This section is empty.

Jump to

Keyboard shortcuts

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