github

package
v0.0.3 Latest Latest
Warning

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

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

Documentation

Overview

Package github implements a github connector

Index

Constants

View Source
const AccessTokenEnvVar = "CHAGEN_GITHUB_TOKEN" // nolint: gosec

AccessTokenEnvVar contains the name of environment variable which sets the authentication access token

Variables

View Source
var IssuesPerPage = 30 // nolint: gochecknoglobals

IssuesPerPage defined how many Issues are fetched per page

View Source
var NewClient = client.New // nolint: gochecknoglobals

NewClient links to the constructor, which is used to create Connector.client

View Source
var PRsPerPage = 30 // nolint: gochecknoglobals

PRsPerPage defined how many PRs are fetched per page

View Source
var TagsPerPage = 30 // nolint: gochecknoglobals

TagsPerPage defined how many tags are fetched per page

Functions

func CLIFlags

func CLIFlags() []cli.Flag

CLIFlags returns the possible CLI flags for this connector

func New

func New(ctx *cli.Context) (connectors.Connector, error)

New returns a new initialized Connector or error if any

Types

type Connector

type Connector struct {
	Owner               string
	Repo                string
	ProjectURL          string
	NewTagUseReleaseURL bool
	// contains filtered or unexported fields
}

Connector implements the GitHub connector

func (*Connector) GetNewTagURL

func (c *Connector) GetNewTagURL(TagName string) (string, error)

GetNewTagURL returns the URL for a new tag, which does not exist yet

func (*Connector) Issues

func (c *Connector) Issues(
	ctx context.Context,
	cerr chan<- error,
) (
	ctags <-chan data.Issue,
	cissuescounter <-chan bool,
	cmaxissues <-chan int,
)

Issues returns the issues via channels. Returns possible errors via given cerr channel cissues returns issues cissuescounter returns the channel, which ticks when an issue is proceeded cmaxissues returns the max available amount of issues

func (*Connector) MRs

func (c *Connector) MRs(
	ctx context.Context,
	cerr chan<- error,
) (
	cmrs <-chan data.MR,
	cmrscounter <-chan bool,
	cmaxmrs <-chan int,
)

MRs returns the PRs via channels. Returns possible errors via given cerr channel cmrs returns MRs cmrscounter returns the channel, which ticks when a PR is proceeded cmaxmrs returns the max available amount of MRs

func (*Connector) RepositoryExists

func (c *Connector) RepositoryExists() (bool, error)

RepositoryExists checks if referenced repository is present

func (*Connector) Tags

func (c *Connector) Tags(
	ctx context.Context,
	cerr chan<- error,
) (
	ctags <-chan data.Tag,
	ctagscounter <-chan bool,
	cmaxtags <-chan int,
)

Tags returns the git tags via channels. Returns possible errors via given cerr channel ctags returns tags ctagscounter returns the channel, which ticks when a tag is proceeded cmaxtags returns the max available amount of tags

Directories

Path Synopsis
internal
client
Package client implements the access to the github API package via interface and own wrapper client
Package client implements the access to the github API package via interface and own wrapper client
testclient
Package testclient implements the used interfaces of github API client library and simulates the API answers for our tests
Package testclient implements the used interfaces of github API client library and simulates the API answers for our tests

Jump to

Keyboard shortcuts

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