githubapi

package
v0.1.4 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2025 License: MIT Imports: 13 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ProcessComment

func ProcessComment(event *github.IssueCommentEvent, client *github.Client, logger *slog.Logger)

func RegisterEventHandlers

func RegisterEventHandlers(r *gin.Engine, client *github.Client, logger *slog.Logger, processComment func(*github.IssueCommentEvent, *github.Client, *slog.Logger))

Types

type ProwGitHubClient

type ProwGitHubClient interface {
	GetClient(logger *slog.Logger) *github.Client
	CreateCheckRun(ctx context.Context, owner, repo string, opt github.CreateCheckRunOptions) (*github.CheckRun, *github.Response, error)
}

ProwGitHubClient is an interface for the GitHub client

type ProwLiteGitHubClient

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

ProwLiteGitHubClient is a struct for the GitHub client

func NewGithubClient

func NewGithubClient(logger *slog.Logger) (*ProwLiteGitHubClient, error)

func (*ProwLiteGitHubClient) AddComment

func (g *ProwLiteGitHubClient) AddComment(owner, repo string, prNumber int, commentText string, logger *slog.Logger)

func (*ProwLiteGitHubClient) AddLabelsToIssue

func (g *ProwLiteGitHubClient) AddLabelsToIssue(owner, repo string, prNumber int, labels []string, logger *slog.Logger)

func (*ProwLiteGitHubClient) CreateCheckRun

func (*ProwLiteGitHubClient) CreateLabel

func (g *ProwLiteGitHubClient) CreateLabel(owner, repo, name, color, description string, logger *slog.Logger)

func (*ProwLiteGitHubClient) GetClient

func (g *ProwLiteGitHubClient) GetClient(logger *slog.Logger) *github.Client

func (*ProwLiteGitHubClient) GetPRSHA

func (g *ProwLiteGitHubClient) GetPRSHA(owner, repo string, prNumber int, logger *slog.Logger) string

func (*ProwLiteGitHubClient) RemoveLabel

func (g *ProwLiteGitHubClient) RemoveLabel(owner, repo string, prNumber int, label string, logger *slog.Logger)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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