gitupstreams

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Jan 15, 2021 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AzureDevopsUpstream

type AzureDevopsUpstream struct{}

AzureDevopsUpstream is tested for - dev.azure.com - ssh.dev.azure.com

func (AzureDevopsUpstream) CIURL added in v0.0.2

func (u AzureDevopsUpstream) CIURL(repoURL *url.URL, branch string) (string, error)

CIURL creates a browser url for Azure DevOps https://ssh.dev.azure.com/v3/CORP/Project/GitRepo https://dev.azure.com/CORP/Project/_git/GitRepo For pull-requests: https://dev.azure.com/CORP/Project/_build

func (AzureDevopsUpstream) PullRequestURL added in v0.0.2

func (u AzureDevopsUpstream) PullRequestURL(repoURL *url.URL, branch string) (string, error)

PullRequestURL creates a browser url for Azure DevOps https://ssh.dev.azure.com/v3/CORP/Project/GitRepo https://dev.azure.com/CORP/Project/_git/GitRepo For pull-requests: https://dev.azure.com/CORP/Project/_git/GitRepo/pullrequestcreate?sourceRef=develop&targetRef=master

func (AzureDevopsUpstream) WillHandle

func (u AzureDevopsUpstream) WillHandle(repoURL *url.URL) bool

WillHandle for azure devops

type BitbucketOrgUpstream

type BitbucketOrgUpstream struct{}

BitbucketOrgUpstream is tested for - Bitbucket.org

func (BitbucketOrgUpstream) BranchURL

func (u BitbucketOrgUpstream) BranchURL(repoURL *url.URL, branch string) (string, error)

BranchURL creates a browser url for Bitbucket.Org For branch:

func (BitbucketOrgUpstream) CIURL added in v0.0.2

func (u BitbucketOrgUpstream) CIURL(repoURL *url.URL, branch string) (string, error)

CIURL creates a browser url for Bitbucket.Org For branch:

func (BitbucketOrgUpstream) PullRequestURL added in v0.0.2

func (u BitbucketOrgUpstream) PullRequestURL(repoURL *url.URL, branch string) (string, error)

PullRequestURL creates a browser url for Bitbucket.Org For branch:

func (BitbucketOrgUpstream) WillHandle

func (u BitbucketOrgUpstream) WillHandle(repoURL *url.URL) bool

WillHandle for generic is always true.. This is used as a sane fallback

type BitbucketUpstream added in v0.0.2

type BitbucketUpstream struct{}

BitbucketUpstream is tested for - Bitbucket

func (BitbucketUpstream) CIURL added in v0.0.2

func (u BitbucketUpstream) CIURL(repoURL *url.URL, branch string) (string, error)

CIURL creates a browser url for Bitbucket For branch:

func (BitbucketUpstream) PullRequestURL added in v0.0.2

func (u BitbucketUpstream) PullRequestURL(repoURL *url.URL, branch string) (string, error)

PullRequestURL creates a browser url for Bitbucket For branch:

func (BitbucketUpstream) WillHandle added in v0.0.2

func (u BitbucketUpstream) WillHandle(repoURL *url.URL) bool

WillHandle for generic is always true.. This is used as a sane fallback

type GenericUpstream

type GenericUpstream struct{}

GenericUpstream is tested for - Github.com - Gist.Github.com

func (GenericUpstream) BranchURL

func (u GenericUpstream) BranchURL(repoURL *url.URL, branch string) (string, error)

BranchURL for all generic git repoes

func (GenericUpstream) CIURL added in v0.0.2

func (u GenericUpstream) CIURL(repoURL *url.URL, branch string) (string, error)

CIURL for all generic git repoes https://github.com/user/repo/actions?query=branch%3Amain

func (GenericUpstream) PullRequestURL added in v0.0.2

func (u GenericUpstream) PullRequestURL(repoURL *url.URL, branch string) (string, error)

PullRequestURL for all generic git repoes https://github.com/user/repo/compare/master...develop

func (GenericUpstream) WillHandle

func (u GenericUpstream) WillHandle(repoURL *url.URL) bool

WillHandle for generic is always true.. This is used as a sane fallback

type GitURLHandler

type GitURLHandler struct {
	// contains filtered or unexported fields
}

GitURLHandler creates browser urls

func NewGitURLHandler

func NewGitURLHandler() GitURLHandler

NewGitURLHandler creates a new GitURLHandler with all known upstreams configured

func NewGitURLHandlerWithOverwrite added in v0.0.2

func NewGitURLHandlerWithOverwrite(overwriteGitUpstream string) GitURLHandler

NewGitURLHandlerWithOverwrite creates a new GitURLHandler containing only the specified upstream

func (GitURLHandler) GetBrowerURL

func (g GitURLHandler) GetBrowerURL(remoteURL string, domain, branch string) (string, error)

GetBrowerURL parses a git remote url, and create a url to be used in a browser

func (GitURLHandler) GetCIURL added in v0.0.2

func (g GitURLHandler) GetCIURL(remoteURL string, domain, branch string) (string, error)

GetCIURL parses a git remote url, and create a url to be used in a browser

func (GitURLHandler) GetPullRequestURL added in v0.0.2

func (g GitURLHandler) GetPullRequestURL(remoteURL string, domain, branch string) (string, error)

GetPullRequestURL parses a git remote url, and create a url to be used in a browser

type GitlabUpstream added in v0.0.2

type GitlabUpstream struct{}

GitlabUpstream is tested for - gitlab.com

func (GitlabUpstream) BranchURL added in v0.0.2

func (u GitlabUpstream) BranchURL(repoURL *url.URL, branch string) (string, error)

BranchURL creates a browser url for gitlab.com For branch:

func (GitlabUpstream) CIURL added in v0.0.2

func (u GitlabUpstream) CIURL(repoURL *url.URL, branch string) (string, error)

CIURL creates a browser url for gitlab.com For branch:

func (GitlabUpstream) PullRequestURL added in v0.0.2

func (u GitlabUpstream) PullRequestURL(repoURL *url.URL, branch string) (string, error)

PullRequestURL creates a browser url for gitlab.com For branch:

func (GitlabUpstream) WillHandle added in v0.0.2

func (u GitlabUpstream) WillHandle(repoURL *url.URL) bool

WillHandle for generic is always true.. This is used as a sane fallback

Jump to

Keyboard shortcuts

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