github

package
v0.0.0-...-1c4df2c Latest Latest
Warning

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

Go to latest
Published: Mar 1, 2019 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AuthorizationHeaderName = "Authorization"
)

Variables

This section is empty.

Functions

func AddAuthorizationHeader

func AddAuthorizationHeader(req *http.Request, token auth.TokenProvider) error

func CreatePullRequest

func CreatePullRequest(routingInfo PullRequestRoutingInfo, prTitle PullRequestTitle, prDescription PullRequestDescription) (string, error)

func Fork

func Fork(token auth.TokenProvider, owner string, repo string) (string, error)

ForkRepository forks a GitHub repository, returning a clone-able git URL

func ForkUrl

func ForkUrl(owner string, repo string) string

ForkUrl returns the URL to use when issuing a fork request to the GitHub API

func GitUrl

func GitUrl(owner string, repo string) string

GitUrl returns the URL to use for Git operations against a repo hosted on GitHub (e.g. clone, pu

func HttpClient

func HttpClient() *http.Client

func PrUrl

func PrUrl(owner string, repo string) string

PrUrl returns the URL to use when creating a pull request against a repo hosted on GitHub

func RepoApiUrl

func RepoApiUrl(owner string, repo string) string

RepoApiUrl returns the URL to use when performing CRUD operations against a repo hosted on GitHu

Types

type PullRequestDescription

type PullRequestDescription string

type PullRequestRoutingInfo

type PullRequestRoutingInfo interface {
	Token() auth.TokenProvider
	SourceRepositoryOwner() string
	SourceRepository() string
	SourceBranch() string
	TargetRepositoryOwner() string
	TargetRepository() string
	TargetBranch() string
}

func NewPullRequestRoutingInfo

func NewPullRequestRoutingInfo(
	token auth.TokenProvider,
	sourceOwner SourceOwner,
	sourceRepository SourceRepository,
	sourceBranch SourceBranch,
	targetOwner TargetOwner,
	targetRepository TargetRepository,
	targetBranch TargetBranch,
) PullRequestRoutingInfo

type PullRequestTitle

type PullRequestTitle string

type SourceBranch

type SourceBranch string

type SourceOwner

type SourceOwner string

type SourceRepository

type SourceRepository string

type TargetBranch

type TargetBranch string

type TargetOwner

type TargetOwner string

type TargetRepository

type TargetRepository string

Directories

Path Synopsis
Code generated by counterfeiter.
Code generated by counterfeiter.

Jump to

Keyboard shortcuts

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