github

package
v1.230.2 Latest Latest
Warning

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

Go to latest
Published: Jun 15, 2022 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateIssue

func CreateIssue(ghCreateIssueOptions *CreateIssueOptions) error

func NewClient

func NewClient(token, apiURL, uploadURL string, trustedCerts []string) (context.Context, *github.Client, error)

NewClient creates a new GitHub client using an OAuth token for authentication

Types

type CreateIssueOptions

type CreateIssueOptions struct {
	APIURL         string   `json:"apiUrl,omitempty"`
	Assignees      []string `json:"assignees,omitempty"`
	Body           []byte   `json:"body,omitempty"`
	Owner          string   `json:"owner,omitempty"`
	Repository     string   `json:"repository,omitempty"`
	Title          string   `json:"title,omitempty"`
	UpdateExisting bool     `json:"updateExisting,omitempty"`
	Token          string   `json:"token,omitempty"`
	TrustedCerts   []string `json:"trustedCerts,omitempty"`
}

CreateIssueOptions to configure the creation

type FetchCommitOptions

type FetchCommitOptions struct {
	APIURL       string   `json:"apiUrl,omitempty"`
	Owner        string   `json:"owner,omitempty"`
	Repository   string   `json:"repository,omitempty"`
	Token        string   `json:"token,omitempty"`
	SHA          string   `json:"sha,omitempty"`
	TrustedCerts []string `json:"trustedCerts,omitempty"`
}

FetchCommitOptions to configure the lookup

type FetchCommitResult

type FetchCommitResult struct {
	Files     int
	Total     int
	Additions int
	Deletions int
}

FetchCommitResult to handle the lookup result

func FetchCommitStatistics

func FetchCommitStatistics(options *FetchCommitOptions) (FetchCommitResult, error)

https://docs.github.com/en/rest/reference/commits#get-a-commit FetchCommitStatistics looks up the statistics for a certain commit SHA.

Jump to

Keyboard shortcuts

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