github

package
v0.0.0-...-59f949b Latest Latest
Warning

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

Go to latest
Published: May 26, 2018 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Overview

Copyright (C) 2016 The BlameWarrior Authors.

This file is a part of BlameWarrior service.

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrRateLimitReached = errors.New("GitHub API request rate limit reached")
	ErrNoSuchRepository = errors.New("no such repository")
)

Functions

func SplitRepositoryName

func SplitRepositoryName(fullName string) (owner, repo string)

SplitRepositoryName splits full GitHub repository name into owner and name parts.

Types

type Client

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

Client wraps github.com/google/go-github/github.Client providing methods adapted for BlameWarrior use cases.

func NewClient

func NewClient(tokenClient tokens.Client) *Client

func (*Client) RepositoryCollaborators

func (c *Client) RepositoryCollaborators(ctx Context, repoFullName string) (collaborators []blamewarrior.Account, err error)

RepositoryCollaborators returns GitHub nicknames of collaborators of given repository.

type Context

type Context struct {
	context.Context
	// BaseURL overrides GitHub API endpoint and is intended for use in tests.
	BaseURL *url.URL
}

Jump to

Keyboard shortcuts

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