syncer

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2026 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GitHubClient

type GitHubClient interface {
	GetRepo(ctx context.Context, owner, repo string, reporter gh.Reporter) (map[string]any, error)
	GetIssue(ctx context.Context, owner, repo string, number int, reporter gh.Reporter) (map[string]any, error)
	ListRepositoryIssues(ctx context.Context, owner, repo string, options gh.ListIssuesOptions, reporter gh.Reporter) ([]map[string]any, error)
	ListIssueComments(ctx context.Context, owner, repo string, number int, reporter gh.Reporter) ([]map[string]any, error)
	ListPullReviews(ctx context.Context, owner, repo string, number int, reporter gh.Reporter) ([]map[string]any, error)
	ListPullReviewComments(ctx context.Context, owner, repo string, number int, reporter gh.Reporter) ([]map[string]any, error)
}

type Options

type Options struct {
	Owner           string
	Repo            string
	State           string
	Since           string
	Limit           int
	Numbers         []int
	IncludeComments bool
	Reporter        gh.Reporter
}

type Stats

type Stats struct {
	Repository         string `json:"repository"`
	ThreadsSynced      int    `json:"threads_synced"`
	IssuesSynced       int    `json:"issues_synced"`
	PullRequestsSynced int    `json:"pull_requests_synced"`
	CommentsSynced     int    `json:"comments_synced"`
	ThreadsClosed      int    `json:"threads_closed"`
	RequestedSince     string `json:"requested_since,omitempty"`
	Limit              int    `json:"limit,omitempty"`
	Numbers            []int  `json:"numbers,omitempty"`
	MetadataOnly       bool   `json:"metadata_only"`
	StartedAt          string `json:"started_at"`
	FinishedAt         string `json:"finished_at"`
}

type Syncer

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

func New

func New(client GitHubClient, st *store.Store) *Syncer

func (*Syncer) Sync

func (s *Syncer) Sync(ctx context.Context, options Options) (Stats, error)

Jump to

Keyboard shortcuts

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