github

package
v1.2.14 Latest Latest
Warning

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

Go to latest
Published: Dec 28, 2025 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddIssueComment

func AddIssueComment(client *http.Client, owner, repo string, issueNum int, body string) error

func AddPRComment

func AddPRComment(client *http.Client, owner, repo string, prNum int, body string) error

func CreateIssue

func CreateIssue(client *http.Client, owner, repo string, title, body string) error

func CreatePR

func CreatePR(client *http.Client, owner, repo string, head, base string) error

func Download added in v1.1.3

func Download(client *http.Client, owner, repo, ref, path string) error

func DownloadFromURL added in v1.1.3

func DownloadFromURL(client *http.Client, url string) error

func GetActionJobInfo

func GetActionJobInfo(client *http.Client, owner, repo string, runID, jobID int) error

func GetGitHubClient

func GetGitHubClient(credentialsFile string, pat string) (*http.Client, error)

func ListActionJobs

func ListActionJobs(client *http.Client, owner, repo string, runID int) error

func ListActions

func ListActions(client *http.Client, owner, repo string) error

func ListIssueComments

func ListIssueComments(client *http.Client, owner, repo string, issueNum int) error

func ListIssues

func ListIssues(client *http.Client, owner, repo string) error

func ListPRComments

func ListPRComments(client *http.Client, owner, repo string, prNum int) error

func ListPRs

func ListPRs(client *http.Client, owner, repo string) error

func ParseGitHubURL added in v1.1.3

func ParseGitHubURL(url string) (owner, repo, ref, path string, err error)

func StreamActionJobLogs

func StreamActionJobLogs(client *http.Client, owner, repo string, runID, jobID int) error

Types

type AccessTokenResponse

type AccessTokenResponse struct {
	AccessToken string `json:"access_token"`
	TokenType   string `json:"token_type"`
	Scope       string `json:"scope"`
}

type DeviceCodeResponse

type DeviceCodeResponse struct {
	DeviceCode      string `json:"device_code"`
	UserCode        string `json:"user_code"`
	VerificationURI string `json:"verification_uri"`
	ExpiresIn       int    `json:"expires_in"`
	Interval        int    `json:"interval"`
}

type GitHubCredentials

type GitHubCredentials struct {
	ClientID string `json:"client_id"`
}

type RepoPath

type RepoPath struct {
	Owner string
	Repo  string
	Path  string
}

type TokenErrorResponse

type TokenErrorResponse struct {
	Error            string `json:"error"`
	ErrorDescription string `json:"error_description"`
	ErrorURI         string `json:"error_uri"`
}

Jump to

Keyboard shortcuts

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