package main
import (
"log"
"net/http"
"github.com/google/go-github/github"
"github.com/shogo82148/ghwebhook"
)
func main() {
h := &ghwebhook.Webhook{
// recommend to set secret
Secret: "very-secret-string",
// Restrict IP address
RestrictAddr: true,
TrustAddrs: []string{"::1/128", "127.0.0.0/8"},
Ping: func(e *github.PingEvent) {
log.Printf("%#v", e)
},
}
http.ListenAndServe(":8080", h)
}
github webhook receiver utils written by golang
License
shogo82148/ghwebhook
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
github webhook receiver utils written by golang
Resources
License
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published