githubclient

package
v0.40.2 Latest Latest
Warning

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

Go to latest
Published: Dec 12, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewClient

func NewClient(client *http.Client, accessToken string, customConfig config.CustomConfiguration) (*github.Client, error)

Types

type CacheConditionCallback

type CacheConditionCallback func(method string, url string, requestBody interface{}) bool

type Caching

type Caching struct {
	Wrapped           *http.Client
	Cache             *httpcache.Transport
	UseCacheCondition CacheConditionCallback
}

func NewCaching

func NewCaching(
	wrapped *http.Client,
	useCacheCondition CacheConditionCallback,
) *Caching

func (*Caching) Client

func (c *Caching) Client() *http.Client

func (*Caching) RoundTrip

func (c *Caching) RoundTrip(req *http.Request) (resp *http.Response, err error)

type Impl

type Impl struct {
	CustomConfig config.CustomConfiguration
	// contains filtered or unexported fields
}

func New

func New(client *github.Client, customConfig config.CustomConfiguration) *Impl

func (*Impl) CreatePullRequestComment

func (r *Impl) CreatePullRequestComment(ctx context.Context, owner, repoName, pullRequestID, text string) error

func (*Impl) GetChangedFilesOnPullRequest

func (r *Impl) GetChangedFilesOnPullRequest(ctx context.Context, repoPath, repoName, pullRequestID, toRef string) ([]repository.File, string, error)

func (*Impl) GetUser

func (r *Impl) GetUser(ctx context.Context, username string) (string, error)

func (*Impl) SetCommitStatusFailed

func (r *Impl) SetCommitStatusFailed(ctx context.Context, owner, repoName, commitID, url string, statusKey string) error

func (*Impl) SetCommitStatusInProgress

func (r *Impl) SetCommitStatusInProgress(ctx context.Context, owner, repoName, commitID, url string, statusKey string) error

func (*Impl) SetCommitStatusSucceeded

func (r *Impl) SetCommitStatusSucceeded(ctx context.Context, owner, repoName, commitID, url string, statusKey string) error

Jump to

Keyboard shortcuts

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