github

package
v0.0.0-...-83c8144 Latest Latest
Warning

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

Go to latest
Published: Aug 22, 2020 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

package github contains a set of scrapers for GitHub. See also: https://docs.github.com/en/rest

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ScrapeCommitStats

func ScrapeCommitStats(dbConn *pgx.Conn, ghClient *github.Client, options ScrapeCommitStatsOptions) error

func ScrapeCommits

func ScrapeCommits(dbConn *pgx.Conn, ghClient *github.Client, options ScrapeCommitsOptions) (int, error)

func ScrapeIssues

func ScrapeIssues(dbConn *pgx.Conn, ghClient *github.Client, options ScrapeIssuesOptions) (int, error)

func ScrapeOrganizations

func ScrapeOrganizations(dbConn *pgx.Conn, ghClient *github.Client, options ScrapeOrganizationsOptions) (int, error)

func ScrapePullRequests

func ScrapePullRequests(dbConn *pgx.Conn, ghClient *github.Client, options ScrapePullRequestsOptions) (int, error)

func ScrapeRepository

func ScrapeRepository(dbConn *pgx.Conn, ghClient *github.Client, options ScrapeRepositoryOptions) error

func ScrapeTeams

func ScrapeTeams(dbConn *pgx.Conn, ghClient *github.Client, options ScrapeTeamsOptions) (int, error)

func ScrapeUsers

func ScrapeUsers(dbConn *pgx.Conn, ghClient *github.Client, options ScrapeUsersOptions) (int, error)

Types

type OrgRepoAndRepoId

type OrgRepoAndRepoId struct {
	Owner string
	Repo  string
	// Providing RepoID allows for skipping a query for the repo's ID for List calls.
	RepoId int64
}

Convenience struct used to hold repo identifiers, typically in scrape options structs.

type ScrapeCommitStatsOptions

type ScrapeCommitStatsOptions struct {
	Owner string
	Repo  string
	// Providing RepoID allows for skipping a query for the repo's ID.
	// If this value is 0, the repo's ID will be queried from the Owner+Repo combo.
	RepoId    int64
	CommitSHA string
	// If true, scrape change stats for all files changed in the commit.
	ScrapeFiles bool
}

type ScrapeCommitsOptions

type ScrapeCommitsOptions struct {
	OrgRepoAndRepoId
	// If true, also scrape the commit's change statistics (adds/mods/deletions).
	ScrapeStats bool
	// If true, scrape change stats for all files changed in the commit.
	ScrapeFiles bool
}

type ScrapeIssuesOptions

type ScrapeIssuesOptions struct {
	OrgRepoAndRepoId
	// If true, scrape the PR summary stats (comment count, additions, deletions, etc).
	// This is VERY slow since we end up making one API request per scraped PR.
	ScrapeStats bool
}

type ScrapeOrganizationsOptions

type ScrapeOrganizationsOptions struct{}

type ScrapePullRequestsOptions

type ScrapePullRequestsOptions struct {
	OrgRepoAndRepoId
	// If true, scrape the PR summary stats (comment count, additions, deletions, etc).
	// This is VERY slow since we end up making one API request per scraped PR.
	ScrapeStats bool
}

type ScrapeRepositoryOptions

type ScrapeRepositoryOptions struct {
	OrgRepoAndRepoId
}

type ScrapeTeamsOptions

type ScrapeTeamsOptions struct {
	Org string
}

type ScrapeUsersOptions

type ScrapeUsersOptions struct{}

Jump to

Keyboard shortcuts

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