syncer

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: May 18, 2026 License: MIT Imports: 13 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)
	GetPull(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)
	ListPullReviewThreads(ctx context.Context, owner, repo string, number int, reporter gh.Reporter) ([]map[string]any, error)
	ListPullFiles(ctx context.Context, owner, repo string, number int, reporter gh.Reporter) ([]map[string]any, error)
	ListPullCommits(ctx context.Context, owner, repo string, number int, reporter gh.Reporter) ([]map[string]any, error)
	ListCommitCheckRuns(ctx context.Context, owner, repo, ref string, reporter gh.Reporter) ([]map[string]any, error)
	ListWorkflowRuns(ctx context.Context, owner, repo string, options gh.ListWorkflowRunsOptions, 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
	IncludePRDetails bool
	Reporter         gh.Reporter
	Logger           *slog.Logger
}

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"`
	ReviewThreadsSynced int    `json:"review_threads_synced"`
	PRDetailsSynced     int    `json:"pr_details_synced"`
	PRFilesSynced       int    `json:"pr_files_synced"`
	PRCommitsSynced     int    `json:"pr_commits_synced"`
	PRChecksSynced      int    `json:"pr_checks_synced"`
	WorkflowRunsSynced  int    `json:"workflow_runs_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