github

package
v0.32.0 Latest Latest
Warning

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

Go to latest
Published: Sep 24, 2020 License: MPL-2.0 Imports: 14 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GithubRepo

type GithubRepo struct {
	Name         string
	Owner        string
	PullRequests []*ghb.PullRequest
	RemoteRepo   *ghb.Repository
	Err          error
	// contains filtered or unexported fields
}

GithubRepo defines a new GithubRepo structure

func NewGithubRepo

func NewGithubRepo(name, owner, apiKey, baseURL, uploadURL string) *GithubRepo

NewGithubRepo returns a new Github Repo with a name, owner, apiKey, baseURL and uploadURL

func (*GithubRepo) IssueCount

func (repo *GithubRepo) IssueCount() int

IssueCount return the total amount of issues as an int

func (*GithubRepo) Open

func (repo *GithubRepo) Open()

Open will open the GitHub Repo URL using the utils helper

func (*GithubRepo) OpenIssues added in v0.25.0

func (repo *GithubRepo) OpenIssues()

Open will open the GitHub Issues URL using the utils helper

func (*GithubRepo) OpenPulls added in v0.25.0

func (repo *GithubRepo) OpenPulls()

Open will open the GitHub Pull Requests URL using the utils helper

func (*GithubRepo) PullRequestCount

func (repo *GithubRepo) PullRequestCount() int

PullRequestCount returns the total amount of pull requests as an int

func (*GithubRepo) Refresh

func (repo *GithubRepo) Refresh()

Refresh reloads the github data via the Github API

func (*GithubRepo) StarCount

func (repo *GithubRepo) StarCount() int

StarCount returns the total amount of stars this repo has gained as an int

type Settings

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

Settings defines the configuration properties for this module

func NewSettingsFromYAML

func NewSettingsFromYAML(name string, ymlConfig *config.Config, globalConfig *config.Config) *Settings

NewSettingsFromYAML creates a new settings instance from a YAML config block

type Widget

type Widget struct {
	view.MultiSourceWidget
	view.KeyboardWidget
	view.TextWidget

	GithubRepos []*GithubRepo

	Selected int

	Items []int
	// contains filtered or unexported fields
}

Widget define wtf widget to register widget later

func NewWidget

func NewWidget(app *tview.Application, pages *tview.Pages, settings *Settings) *Widget

NewWidget creates a new instance of the widget

func (*Widget) GetItemCount added in v0.22.0

func (widget *Widget) GetItemCount() int

GetItemCount returns the amount of PRs RRs and other PRs calculated so far as an int

func (*Widget) GetSelected added in v0.22.0

func (widget *Widget) GetSelected() int

GetSelected returns the index of the currently highlighted item as an int

func (*Widget) HelpText added in v0.10.0

func (widget *Widget) HelpText() string

HelpText displays the widgets controls

func (*Widget) Next

func (widget *Widget) Next()

Next cycles the currently highlighted text down

func (*Widget) Prev

func (widget *Widget) Prev()

Prev cycles the currently highlighted text up

func (*Widget) Refresh

func (widget *Widget) Refresh()

Refresh reloads the github data via the Github API and reruns the display

func (*Widget) SetItemCount added in v0.22.0

func (widget *Widget) SetItemCount(items int)

SetItemCount sets the amount of PRs RRs and other PRs throughout the widgets display creation

func (*Widget) Unselect added in v0.22.0

func (widget *Widget) Unselect()

Unselect stops highlighting the text and jumps the scroll position to the top

Jump to

Keyboard shortcuts

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