Documentation
¶
Index ¶
- func IsNotFound(err error) bool
- type Client
- func (c *Client) CheckRateLimit(ctx context.Context)
- func (c *Client) CompareCommits(ctx context.Context, owner, repo, base, head string) ([]*models.CommitFile, []*models.Commit, error)
- func (c *Client) CreatePRComment(ctx context.Context, owner, repo string, number int, body string) error
- func (c *Client) CreateReview(ctx context.Context, owner, repo string, number int, commitID string, ...) error
- func (c *Client) GetPullRequest(ctx context.Context, owner, repo string, number int) (*models.PullRequest, error)
- func (c *Client) GetPullRequestLabels(ctx context.Context, owner, repo string, number int) ([]string, error)
- func (c *Client) GetRepoVariable(ctx context.Context, owner, repo, name string) (string, error)
- type EventHandler
- type WebhookHandler
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsNotFound ¶
IsNotFound checks if an error is a 404 Not Found error
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client implements the models.GitPlatform interface for GitHub
func (*Client) CheckRateLimit ¶
CheckRateLimit logs the current rate limit status
func (*Client) CompareCommits ¶
func (c *Client) CompareCommits(ctx context.Context, owner, repo, base, head string) ([]*models.CommitFile, []*models.Commit, error)
CompareCommits compares two commits and returns the files that changed
func (*Client) CreatePRComment ¶
func (c *Client) CreatePRComment(ctx context.Context, owner, repo string, number int, body string) error
CreatePRComment creates a comment on a pull request
func (*Client) CreateReview ¶
func (c *Client) CreateReview(ctx context.Context, owner, repo string, number int, commitID string, comments []*models.ReviewComment, body string) error
CreateReview creates a review on a pull request
func (*Client) GetPullRequest ¶
func (c *Client) GetPullRequest(ctx context.Context, owner, repo string, number int) (*models.PullRequest, error)
GetPullRequest gets a pull request by number
type EventHandler ¶
type EventHandler func(payload interface{}) error
EventHandler is a function that handles a specific GitHub event
type WebhookHandler ¶
type WebhookHandler struct {
// contains filtered or unexported fields
}
WebhookHandler handles GitHub webhook events
func NewWebhookHandler ¶
func NewWebhookHandler(secret string) *WebhookHandler
NewWebhookHandler creates a new webhook handler
func (*WebhookHandler) HandleWebhook ¶
func (h *WebhookHandler) HandleWebhook(w http.ResponseWriter, r *http.Request)
HandleWebhook handles incoming webhook requests
func (*WebhookHandler) On ¶
func (h *WebhookHandler) On(event string, handler EventHandler)
On registers a handler for a specific event
Click to show internal directories.
Click to hide internal directories.