internal

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Sep 1, 2025 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateGithubClient

func CreateGithubClient() *github.Client

func DeleteAuthToken

func DeleteAuthToken() error

func GetAuthToken

func GetAuthToken() (string, bool)

func SaveAuthToken

func SaveAuthToken(token string) error

Types

type GitHubTarget

type GitHubTarget struct {
	Owner      string
	Repository string
	Directory  string
	Ref        string
}

func InferTargetFromUrl

func InferTargetFromUrl(githubUrl string) (GitHubTarget, error)

InferTargetFromUrl will take a valid GitHub URL and create a GitHubTarget object from it. A GitHub URL will take the form "https://github.com/{owner}/{repo}/((tree|blob)/<ref>)?/(<path>/<to>/<root>)?", where:

  • "(tree|blob)/<ref>" is optional, if not present it defaults to the default branch of the repo. "tree" is used when the target is a directory, "blob" is used when the target is a file

  • "<ref>" can either be a commit hash or branch

  • "<path>/<to>/<root>" is optional

  • If "<path>/<to>/<root>" is present, then "tree/<ref>" or "blob/<ref>" MUST be present

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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