Documentation
¶
Overview ¶
Package github implements a github connector
Index ¶
- Constants
- Variables
- func CLIFlags() []cli.Flag
- func New(ctx *cli.Context) (connectors.Connector, error)
- type Connector
- func (c *Connector) GetNewTagURL(TagName string) (string, error)
- func (c *Connector) Issues(ctx context.Context, cerr chan<- error) (ctags <-chan data.Issue, cissuescounter <-chan bool, cmaxissues <-chan int)
- func (c *Connector) MRs(ctx context.Context, cerr chan<- error) (cmrs <-chan data.MR, cmrscounter <-chan bool, cmaxmrs <-chan int)
- func (c *Connector) RepositoryExists() (bool, error)
- func (c *Connector) Tags(ctx context.Context, cerr chan<- error) (ctags <-chan data.Tag, ctagscounter <-chan bool, cmaxtags <-chan int)
Constants ¶
const AccessTokenEnvVar = "CHAGEN_GITHUB_TOKEN" // nolint: gosec
AccessTokenEnvVar contains the name of environment variable which sets the authentication access token
Variables ¶
var IssuesPerPage = 30 // nolint: gochecknoglobals
IssuesPerPage defined how many Issues are fetched per page
var NewClient = client.New // nolint: gochecknoglobals
NewClient links to the constructor, which is used to create Connector.client
var PRsPerPage = 30 // nolint: gochecknoglobals
PRsPerPage defined how many PRs are fetched per page
var TagsPerPage = 30 // nolint: gochecknoglobals
TagsPerPage defined how many tags are fetched per page
Functions ¶
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 ¶
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 ¶
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 |