shared

package
v0.1.7 Latest Latest
Warning

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

Go to latest
Published: Aug 30, 2023 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const ConcurrentClones int = 3
View Source
const Script = `` /* 130-byte string literal not displayed */

Variables

This section is empty.

Functions

func Clone

func Clone(repoName string, baseBranchName string, headBranchName string)

func Commit

func Commit(repoName string, commitMsg string) error

Commits the staged changes in a repo. Returns NoChangesError if there are no staged changes in the repo.

func Config

func Config(base_branch string) string

func GetGitHubClient

func GetGitHubClient() (client *github.Client, ctx context.Context)

func PR

func PR(repoName string, repoOwner string, title string, draft bool, baseBranch string, headBranch string, body string, maintainerModify bool, labels []string)

func Push

func Push(repoName string, headBranchName string, deleteBranch bool)

Types

type CloneJob

type CloneJob struct {
	RepoName      string
	NewBranchName string
}

type ConfigInterface

type ConfigInterface struct {
	PR struct {
		RepoOwner         string   `yaml:"repo_owner"`
		BaseBranch        string   `yaml:"base_branch"`
		MaintainersModify bool     `yaml:"maintainers_can_modify"`
		Draft             bool     `yaml:"draft"`
		Title             string   `yaml:"title"`
		Body              string   `yaml:"body"`
		Labels            []string `yaml:"labels"`
	} `yaml:"pr"`
	Repos      []string `yaml:"repos"`
	BranchName string   `yaml:"branch_name"`
	CommitMsg  string   `yaml:"commit_msg"`
}

func ReadConfig

func ReadConfig() (config ConfigInterface)

type NoChangesError

type NoChangesError struct{}

func (*NoChangesError) Error

func (e *NoChangesError) Error() string

Jump to

Keyboard shortcuts

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