webhook

package
v0.0.0-...-aaf700e Latest Latest
Warning

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

Go to latest
Published: Jan 15, 2026 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func VerifySignature

func VerifySignature(payload []byte, headerSignature string, secret string) bool

verifySignature checks if the provided signature is valid for the given payload.

Types

type EventInfo

type EventInfo struct {
	Ignore         bool     `json:"ignore"`
	RepoOwner      string   `json:"owner"`
	RepoName       string   `json:"repo"`
	RepoDefaultRef string   `json:"default_ref"`
	Sha            string   `json:"commit_sha"`
	PrNum          int      `json:"pr"`
	ChangeRef      string   `json:"change_ref"`
	BaseRef        string   `json:"base_ref"`
	Refresh        bool     `json:"refresh"`
	ChangedFiles   []string `json:"changed_files,omitempty"`
}

Data structure for information passed by github webhook events

func NewEventInfo

func NewEventInfo() EventInfo

func ProcessComment

func ProcessComment(payload []byte) (EventInfo, error)

Processes a comment created event received from github

func ProcessPullRequest

func ProcessPullRequest(payload []byte) (EventInfo, error)

Processes a pull_request event received from github

Jump to

Keyboard shortcuts

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