github

package
v0.0.6 Latest Latest
Warning

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

Go to latest
Published: Jul 2, 2019 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package github is a plugin for bawt that interacts with GitHub

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	Conf Conf
}

func (*Client) DoEventQuery

func (ghclient *Client) DoEventQuery(issueList []IssueItem, repo string, issueChan chan IssueItem)

func (*Client) DoSearchQuery

func (ghclient *Client) DoSearchQuery(query SearchQuery) ([]IssueItem, error)

func (*Client) Get

func (ghclient *Client) Get(url string) (body []byte, err error)

type Conf

type Conf struct {
	Authtoken      string            `mapstructure:"authtoken"`
	Repos          []string          `mapstructure:"repos"`
	Github2Hipchat map[string]string `mapstructure:"github2Hipchat"`
}

type GHUser

type GHUser struct {
	Login string
}

type IssueEvent

type IssueEvent struct {
	ID    int
	Actor GHUser
	Event string
}

type IssueItem

type IssueItem struct {
	Url       string
	Title     string
	ID        int
	Number    int
	Milestone string
	Assignee  GHUser
	State     string
	Events    []IssueEvent
}

func (*IssueItem) LastClosedBy

func (issue *IssueItem) LastClosedBy() string

type SearchQuery

type SearchQuery struct {
	Repo        string
	Labels      []string
	ClosedSince string
}

func (*SearchQuery) Url

func (query *SearchQuery) Url() (url string)

type SearchResponse

type SearchResponse struct {
	TotalCount int64 `json:"total_count"`
	Items      []IssueItem
}

Jump to

Keyboard shortcuts

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