zenhub

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Sep 20, 2021 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ZenhubRootEndpoint       = "https://api.zenhub.com"
	ZenhubWorkspacesEndpoint = "/p2/repositories/%s/workspaces"
	ZenhubBoardEndpoint      = "/p2/workspaces/%s/repositories/%s/board"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client interface {
	FetchWorkspaceIssues(ctx context.Context) ([]model.Issue, error)
}

func NewClient

func NewClient(token, repoID, workspaceName string, timeout time.Duration) Client

type ZenHubBoard

type ZenHubBoard struct {
	Pipelines []struct {
		ID     string `json:"id"`
		Name   string `json:"name"`
		Issues []struct {
			IssueNumber int `json:"issue_number"`
			Estimate    *struct {
				Value int `json:"value"`
			} `json:"estimate,omitempty"`
			Position int  `json:"position,omitempty"`
			IsEpic   bool `json:"is_epic"`
		} `json:"issues"`
	} `json:"pipelines"`
}

ZenHubBoard is the object representing board in zenhub world. It is bound with Get board data API Response of zenhub. See: https://github.com/ZenHubIO/API#get-a-zenhub-board-for-a-repository

type ZenHubWorkspace

type ZenHubWorkspace struct {
	Name         string `json:"name"`
	Description  string `json:"description"`
	ID           string `json:"id"`
	Repositories []int  `json:"repositories"`
}

ZenHubWorkspace is the object representing workspace in zenhub world. It is bound with Get workspace data API Response of zenhub. See: https://github.com/ZenHubIO/API#get-zenhub-workspaces-for-a-repository

Jump to

Keyboard shortcuts

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