github

package
v0.0.0-...-a8f86c4 Latest Latest
Warning

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

Go to latest
Published: Aug 3, 2025 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ValidateAppConfig

func ValidateAppConfig(config *GitHubAppConfig, owner, repo string) error

ValidateAppConfig validates GitHub App configuration

func ValidateConfig

func ValidateConfig(token, owner, repo string) error

ValidateConfig validates GitHub configuration

Types

type Client

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

Client represents a GitHub API client

func NewClient

func NewClient(config *GitHubAppConfig, owner, repo string) (*Client, error)

NewClient creates a new GitHub client with GitHub App authentication

func NewClientWithToken

func NewClientWithToken(token, owner, repo string) *Client

NewClientWithToken creates a new GitHub client with personal access token (legacy)

func (*Client) CommentOnPR

func (c *Client) CommentOnPR(ctx context.Context, prNumber int, comment string) error

CommentOnPR adds a comment to a pull request

func (*Client) CreateValidationComment

func (c *Client) CreateValidationComment(report interface{}, validationMode string) string

CreateValidationComment creates a formatted comment for validation results

type GitHubAppConfig

type GitHubAppConfig struct {
	AppID          int64  `json:"app_id"`
	InstallationID int64  `json:"installation_id"`
	PrivateKey     string `json:"private_key"`
	AppSlug        string `json:"app_slug"`
}

GitHubAppConfig represents GitHub App configuration

Jump to

Keyboard shortcuts

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