lib

package
v4.2.8 Latest Latest
Warning

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

Go to latest
Published: Nov 2, 2023 License: MIT Imports: 21 Imported by: 0

Documentation

Index

Constants

View Source
const Version = "4.2.7"

Version is the github-nippou version

Variables

This section is empty.

Functions

func Init

func Init() error

Init initializes github-nippou settings

func OpenSettings

func OpenSettings() error

OpenSettings opens settings url with web browser

Types

type Events

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

Events represents a structure for fetching user-related events from the GitHub API. It holds the necessary parameters to filter and retrieve specific event data for a user.

func NewEvents

func NewEvents(ctx context.Context, client *github.Client, user string, sinceTime, untilTime time.Time, debug bool) *Events

NewEvents is an initializer

func (*Events) Collect

func (e *Events) Collect() ([]*github.Event, error)

Collect retrieve GitHub `e.user` events from `e.sinceTime` to `e.untilTime`

type Format

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

Format is Formatter

func NewFormat

func NewFormat(ctx context.Context, client *github.Client, settings Settings, debug bool) *Format

NewFormat is an initializer

func (*Format) All

func (f *Format) All(lines Lines) (string, error)

All returns all lines which are formatted and sorted

func (*Format) Line

func (f *Format) Line(event *github.Event, i int) Line

Line returns Issue/PR info retrieving from GitHub

type Line

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

Line is line infomation

func NewLineByIssue

func NewLineByIssue(repoName string, issue github.Issue) Line

NewLineByIssue is an initializer by Issue

func NewLineByPullRequest

func NewLineByPullRequest(repoName string, pr github.PullRequest) Line

NewLineByPullRequest is an initializer by PR

type Lines

type Lines []Line

Lines has sort.Interface

func (Lines) Len

func (l Lines) Len() int

func (Lines) Less

func (l Lines) Less(i, j int) bool

func (Lines) Swap

func (l Lines) Swap(i, j int)

type List

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

List is a struct for collecting GitHub activities.

func NewList

func NewList(sinceDate, untilDate, user, accessToken, settingsGistID string, debug bool) *List

NewList returns a new List.

func NewListFromCLI

func NewListFromCLI(sinceDate, untilDate string, debug bool) (*List, error)

NewListFromCLI returns a new List from environment variables or git config.

func (*List) Collect

func (l *List) Collect() (string, error)

Collect collects GitHub activities.

type Settings

type Settings struct {
	Format struct {
		Subject string
		Line    string
	}
	Dictionary struct {
		Status struct {
			Merged string
			Closed string
		}
	}
	URL string
}

Settings has configure

func (*Settings) Init

func (s *Settings) Init(gistID string, accessToken string) error

Init initializes Settings

Jump to

Keyboard shortcuts

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