actions

package
v0.0.0-...-738ed40 Latest Latest
Warning

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

Go to latest
Published: May 30, 2024 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CleanColorCodes

func CleanColorCodes(input string) string

func CompareKeys

func CompareKeys(vars1, vars2 *OrderedMap) ([]string, []string)

func CompareValues

func CompareValues(vars1, vars2 *OrderedMap) map[string][2]interface{}

func CompareYAMLFilesLineByLine

func CompareYAMLFilesLineByLine(file1Path, file2Path string) (string, error)

func CreateBranch

func CreateBranch(client *gitlab.Client, projectID int, newBranch, baseBranch string) error

CreateBranch создает новую ветку в GitLab

func CreateGitLabClient

func CreateGitLabClient(gitlabURL, gitlabToken string) (*gitlab.Client, error)

CreateGitLabClient создает клиент GitLab

func CreateMergeRequest

func CreateMergeRequest(client *gitlab.Client, projectID int, sourceBranch, targetBranch, title, description string, squash, removeSourceBranch bool) error

CreateMergeRequest создает merge request в GitLab

func CreateOrUpdateFile

func CreateOrUpdateFile(client *gitlab.Client, projectID int, filePath, content, branch, commitMessage string) error

CreateOrUpdateFile создает или обновляет файл в GitLab

func FileExists

func FileExists(client *gitlab.Client, projectID int, filePath, branch string) (bool, string, error)

FileExists проверяет, существует ли файл в GitLab

func GenerateKeysComparisonYAML

func GenerateKeysComparisonYAML(onlyInFile1, onlyInFile2 []string) (string, error)

func GenerateUpdatedYAML

func GenerateUpdatedYAML(vars1, vars2 *OrderedMap) (string, error)

func GenerateValuesComparisonYAML

func GenerateValuesComparisonYAML(differences map[string][2]interface{}) (string, error)

func HandleGitLabMergeRequest

func HandleGitLabMergeRequest(gitlabURL, gitlabToken, srcFilePath, filePath, baseBranch, newBranch, targetBranch, projectID, mrTitle, mrDescription string, mrSquash, mrRemoveSourceBranch bool) error

HandleGitLabMergeRequest выполняет все действия для создания merge request в GitLab

func MergeRequestExists

func MergeRequestExists(client *gitlab.Client, projectID int, sourceBranch, targetBranch string) (bool, error)

MergeRequestExists проверяет, существует ли merge request для данной ветки

func ReadFileContent

func ReadFileContent(filePath string) (string, error)

ReadFileContent читает содержимое файла

Types

type OrderedMap

type OrderedMap struct {
	Keys   []string
	Values map[string]interface{}
}

func LoadVariablesFromYAMLWithOrder

func LoadVariablesFromYAMLWithOrder(filePath string) (*OrderedMap, error)

Jump to

Keyboard shortcuts

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