utils

package
v0.0.0-...-f9509a4 Latest Latest
Warning

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

Go to latest
Published: Oct 3, 2025 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CompareYAML

func CompareYAML(yaml1, yaml2 YAML)

func DecodeContent

func DecodeContent(content *github.RepositoryContent) (string, error)

func GetFileContent

func GetFileContent(client *github.Client, file *github.CommitFile, owner, repo, ref string) (*github.RepositoryContent, error)

func GetOwnerRepoPull

func GetOwnerRepoPull(ref, repo string) (string, string, int)

func GetPullRequestBranch

func GetPullRequestBranch(client *github.Client, o, r string, n int) (string, error)

func GetPullRequestFiles

func GetPullRequestFiles(client *github.Client, o, r string, n int) ([]*github.CommitFile, *github.Response, error)

ListFiles retrieves a list of commit files for each pull request in a GitHub repository. It takes a GitHub client and a context as input parameters. It returns a slice of commit files, and an error if any.

func GitHubClient

func GitHubClient(token string) *github.Client

func SelectFile

func SelectFile(file *github.CommitFile) *github.CommitFile

func SplitYAMLDocuments

func SplitYAMLDocuments(data []byte) [][]byte

Types

type YAML

type YAML struct {
	Kind     string `yaml:"kind"`
	Metadata struct {
		Name      string `yaml:"name"`
		Namespace string `yaml:"namespace"`
	} `yaml:"metadata"`
}

func ParseYAMLDocuments

func ParseYAMLDocuments(documents [][]byte) []YAML

Jump to

Keyboard shortcuts

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