githubclient

package
v0.0.0-...-5f77310 Latest Latest
Warning

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

Go to latest
Published: Aug 16, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ApprovalTemplate = `
<details>
<summary>
%v
<br/>
</summary>

~~~json
%v
~~~

</details>
`
)

Variables

This section is empty.

Functions

func CreateGithubClients

func CreateGithubClients(ctx context.Context, tok string) (*github.Client, *githubv4.Client)

func NewAPI

func NewAPI(v3 *github.Client, v4 *githubv4.Client, metrics metrics.Emitter) gh.API

Types

type SimpleDao

type SimpleDao struct {
	// contains filtered or unexported fields
}

func (*SimpleDao) AddReview

func (s *SimpleDao) AddReview(ctx context.Context, id id.PR, summary, event string) error

func (*SimpleDao) EnableAutoMerge

func (s *SimpleDao) EnableAutoMerge(ctx context.Context, id id.PR, method githubv4.PullRequestMergeMethod) error

func (*SimpleDao) GetBranchProtection

func (s *SimpleDao) GetBranchProtection(ctx context.Context, id id.PR, branch string) (*github.Protection, error)

func (*SimpleDao) IssueComment

func (s *SimpleDao) IssueComment(ctx context.Context, id id.PR, comment string) error

func (*SimpleDao) IssueCommentForError

func (s *SimpleDao) IssueCommentForError(ctx context.Context, id id.PR, err errors.APIError) error

func (*SimpleDao) ListAllTopics

func (s *SimpleDao) ListAllTopics(ctx context.Context, id id.PR) ([]string, error)

func (*SimpleDao) ListFilesChangedInPR

func (s *SimpleDao) ListFilesChangedInPR(ctx context.Context, id id.PR) ([]*github.CommitFile, error)

func (*SimpleDao) ListFilesInRootDir

func (s *SimpleDao) ListFilesInRootDir(ctx context.Context, id id.PR, branch string) ([]string, error)

func (*SimpleDao) ListRequiredStatusChecks

func (s *SimpleDao) ListRequiredStatusChecks(ctx context.Context, id id.PR, branch string) ([]string, error)

func (*SimpleDao) ListReviews

func (s *SimpleDao) ListReviews(ctx context.Context, id id.PR) ([]*github.PullRequestReview, error)

Jump to

Keyboard shortcuts

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