github

package
v0.0.0-...-c93426c Latest Latest
Warning

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

Go to latest
Published: Feb 7, 2020 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Auth

func Auth() error

Auth checks if token exists in local config and requests new one if it doesn't

func ListAndPromptBranch

func ListAndPromptBranch(projCfg *aws.Project) (string, error)

ListAndPromptBranch lists all PRs and prompts to return a branch name

func ListAndPromptBranchByName

func ListAndPromptBranchByName(projCfg *aws.Project) (string, error)

ListAndPromptBranchByName lists all remote branches and prompts to return a branch name

func ListRequest

func ListRequest(url string) (req *http.Request, err error)

ListRequest constructs and returns GitHub API based request for listing pull requests

Types

type AuthRequest

type AuthRequest struct {
	Note        string   `json:"note"`
	Scopes      []string `json:"scopes"`
	Fingerprint string   `json:"fingerprint"`
}

AuthRequest is a structure for authentication request body

func GetAuthRequest

func GetAuthRequest() *AuthRequest

GetAuthRequest initializes AuthRequest

type Authorization

type Authorization struct {
	Token   string `json:"token"`
	Message string `json:"message"`
}

Authorization is a body structure of response with token

type GHBranchResponse

type GHBranchResponse struct {
	Name string `json:"name"`
}

GHBranchResponse is a structure of GitHub response

func ListBranchesDo

func ListBranchesDo(projectConfig *aws.Project) (prs []GHBranchResponse, err error)

ListBranchesDo makes a GET request to get all remove branches

type GHPRResponse

type GHPRResponse struct {
	URL   string `json:"url"`
	Title string `json:"title"`
	Head  `json:"head"`
}

GHPRResponse is a structure of GitHub response

func ListPRsDo

func ListPRsDo(projectConfig *aws.Project) (prs []GHPRResponse, err error)

ListPRsDo makes a GET request to get app open PRs

type Head struct {
	Ref string `json:"ref"`
}

Head refers to git head of PR's branch

Jump to

Keyboard shortcuts

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