reposync

package
v0.14.1 Latest Latest
Warning

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

Go to latest
Published: May 24, 2025 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HandleRepository

func HandleRepository(
	_ context.Context,
	dryRun bool,
	output,
	organization string,
	repositoryInfo github.RepositoryInfo,
	protocol CloneProtocol,
	force bool,
) error

HandleRepository determines whether a directory with the repository name does exist. If it does, it checks out its default branch and updates it locally. Otherwise, it clones it.

Types

type CloneProtocol

type CloneProtocol string

CloneProtocol indicates the Git protocol to use for cloning. See the constants exported in this package for further details.

const (
	// SystemProtocol indicates whether to use the Git protocol configured in the GitHub CLI,
	// e.g., via the 'gh config set git_protocol' configuration command
	SystemProtocol CloneProtocol = "system"

	// SSHProtocol forces this extension to clone repositories via SSH.
	// As such, the Git remote will look like: git@github.com:org/repo.git
	SSHProtocol CloneProtocol = "ssh"

	// HTTPSProtocol  forces this extension to clone repositories via HTTPS.
	// As such, the Git remote will look like: https://github.com/org/repo.git
	HTTPSProtocol CloneProtocol = "https"
)

Jump to

Keyboard shortcuts

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