repo

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Mar 24, 2021 License: Apache-2.0 Imports: 18 Imported by: 5

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Commit

func Commit(path string, commitMessage string, gitName string, gitEmail string) (err error)

Commit performs a git commit on the repository.

func CreateBranch

func CreateBranch(path string, name string) (err error)

CreateBranch creates a new branch within the input repository.

func GetBranchName

func GetBranchName(path string) (name string, err error)

GetBranchName returns the name of the current branch.

func Init

func Init(inputParserNames []string)

Init all enabled parsers from config.

func OpenPR

func OpenPR(path, mainBranch, prTitle, gitToken string) (err error)

OpenPR opens a pull request from the input branch to the destination branch.

func ParseDir added in v0.0.6

func ParseDir(location string, output chan<- Result)

ParseDir walks through the repository and outputs the parsed values of the spack packages.

func PullBranch

func PullBranch(path string, branchName string) (err error)

PullBranch attempts to pull the branch from the git origin.

func Push

func Push(path string, gitUsername string, gitToken string) (err error)

Push performs a "git push" on the repository.

func SearchPR

func SearchPR(path, prTitle, gitToken string) (pr github.Issue, err error)

SearchPR searches for the a pull request with the input name in the given repository + owner.

func SearchPrByBranch

func SearchPrByBranch(path, branchName, gitToken string) (pr github.Issue, err error)

SearchPrByBranch checks to see if there is an existing PR based on a specific branch and if so returns the name.

func SwitchBranch

func SwitchBranch(path string, branchName string) (err error)

SwitchBranch switches from the current branch to the one with the name provided.

func UpdatePR

func UpdatePR(pr github.Issue, path, title, gitToken string) (err error)

UpdatePR updates the Title of a PR.

func UpdatePackage

func UpdatePackage(pkg Result) (err error)

UpdatePackage patches the package with the current updated package data.

Types

type Result

type Result struct {
	Package    parsers.Package
	Parser     parsers.Parser
	LookOutput results.Result
	Path       string
}

Result is a reported package and its parsed location from the parsed library.

func Parse

func Parse(path string) (output Result, err error)

Parse parses a single file.

Jump to

Keyboard shortcuts

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