getgitlab

package
v1.0.8 Latest Latest
Warning

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

Go to latest
Published: Sep 16, 2024 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const Message1 = "\t ✅ The number of %s found is: %d\n"
View Source
const Message2 = "\t   Analysis top branch(es) in project <%s> ..."
View Source
const Message3 = "\r\t\t\t\t ✅ %d Project: %s - Number of branches: %d - largest Branch: %s"
View Source
const Message4 = "Project(s)"
View Source
const MessageErro1 = "/\n❌ Failed to list projects for group %s: %v\n"
View Source
const MessageError2 = "\n ❌ Failed to get project %s: %v\n"
View Source
const MessageError3 = "\n❗️ Project %s is in exclude file \n"
View Source
const MessageError4 = "\n❗️ Project %s is empty \n"
View Source
const MessageError5 = "\n❗️ Project %s is archived \n"
View Source
const MessageError6 = "\n❗️ Project %s is in exclude file or empty or archived \n"
View Source
const PrefixMsg = "Get Project(s)..."

Variables

This section is empty.

Functions

func SaveResult

func SaveResult(result AnalysisResult) error

Types

type AnalysisResult

type AnalysisResult struct {
	NumRepositories int
	ProjectBranches []ProjectBranch
}

type AnalyzeProject

type AnalyzeProject struct {
	Project       *gitlab.Project
	GitlabClient  *gitlab.Client
	ExclusionList ExclusionRepos
	Spin1         *spinner.Spinner
	Org           string
}

type Branch

type Branch struct {
	Name string `json:"name"`
}

func GetRepositoryBranches

func GetRepositoryBranches(accessToken, repositoryName string, repositoryID int) ([]Branch, error)

type ExclusionList

type ExclusionList struct {
	Repos map[string]bool `json:"repos"`
}

type ExclusionRepos

type ExclusionRepos map[string]bool

RepositoryMap represents a map of repositories to ignore

func LoadExclusionRepos

func LoadExclusionRepos(filename string) (ExclusionRepos, error)

Load repository ignore map from file

type ProjectBranch

type ProjectBranch struct {
	Org         string
	Namespace   string
	RepoSlug    string
	MainBranch  string
	LargestSize int
}

func GetRepoGitLabList

func GetRepoGitLabList(platformConfig map[string]interface{}, exclusionfile string) ([]ProjectBranch, error)

type Repository

type Repository struct {
	ID            int    `json:"id"`
	Name          string `json:"name"`
	DefaultBranch string `json:"default_branch"`
	Path          string `json:"path_with_namespace"`
	Empty         bool   `json:"empty_repo"`
}

func FetchRepositoriesGitlab

func FetchRepositoriesGitlab(url string, page int, accessToken string) ([]Repository, string, error)

func GetRepoGitlabList

func GetRepoGitlabList(accessToken, organization string) ([]Repository, error)

Get Infos for all Repositories in Organization for Main Branch

Jump to

Keyboard shortcuts

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