Documentation
¶
Index ¶
Constants ¶
View Source
const ( ActionCreated = "created" ActionEdited = "edited" ActionDeleted = "deleted" ActionReleased = "released" EventTypeRepositoryRuleset = "repository_ruleset" EventTypeInstallation = "installation" EventTypeRelease = "release" )
Constants for action and event types
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Changes ¶
type Changes struct { Name struct { From string `json:"from,omitempty"` } `json:"name,omitempty"` Enforcement struct { From string `json:"from,omitempty"` } `json:"enforcement,omitempty"` }
Changes represents the changes in a ruleset event.
type Config ¶
type Config struct { Server HTTPConfig `yaml:"server"` Github githubapp.Config `yaml:"github"` }
Config represents the configuration of the application.
func ReadConfig ¶
ReadConfig reads and parses the configuration file.
type HTTPConfig ¶
HTTPConfig represents the configuration of the HTTP server.
type RulesetEvent ¶
type RulesetEvent struct { Enterprise *github.Enterprise `json:"enterprise,omitempty"` Organization *github.Organization `json:"organization,omitempty"` Repository *github.Repository `json:"repository,omitempty"` Action string `json:"action,omitempty"` Installation *github.Installation `json:"installation,omitempty"` Sender *github.User `json:"sender,omitempty"` Ruleset *github.Ruleset `json:"repository_ruleset,omitempty"` Changes *Changes `json:"changes,omitempty"` }
RulesetEvent represents a GitHub ruleset event.
type RulesetHandler ¶
type RulesetHandler struct { githubapp.ClientCreator zerolog.Logger }
RulesetHandler handles ruleset events.
func (*RulesetHandler) Handle ¶
func (h *RulesetHandler) Handle(ctx context.Context, eventType, deliveryID string, payload []byte) error
Handle processes the event payload based on the event type.
func (*RulesetHandler) Handles ¶
func (h *RulesetHandler) Handles() []string
Handles returns the list of event types handled by the RulesetHandler.
Click to show internal directories.
Click to hide internal directories.