giturl

package
v3.0.0-...-838862a Latest Latest
Warning

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

Go to latest
Published: Oct 2, 2023 License: AGPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateLink(repo, commit, file string, line int64) string

GenerateLink crafts a link to the specific file from a commit. Supports GitHub, GitLab, Bitbucket, and Azure Repos. If the provider supports hyperlinks to specific lines, the line number will be included.

func NormalizeBitbucketRepo

func NormalizeBitbucketRepo(repoURL string) (string, error)

func NormalizeGerritProject

func NormalizeGerritProject(project string) (string, error)

func NormalizeGithubRepo

func NormalizeGithubRepo(repoURL string) (string, error)

func NormalizeGitlabRepo

func NormalizeGitlabRepo(repoURL string) (string, error)

func NormalizeOrgRepoURL

func NormalizeOrgRepoURL(provider provider, repoURL string) (string, error)

NormalizeOrgRepoURL attempts to normalize repos for any provider using the example.com/org/repo style. e.g. %s, Gitlab and Bitbucket

func UpdateLinkLineNumber

func UpdateLinkLineNumber(ctx context.Context, link string, newLine int64) string

UpdateLinkLineNumber updates the line number in a repository link. Used post-link generation to refine reported issue locations within large scanned blocks.

Types

This section is empty.

Jump to

Keyboard shortcuts

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