Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/f2prateek/github-webhook-server


https://github.com/f2prateek/github-webhook-server

Last synced: about 1 month ago
JSON representation

Awesome Lists containing this project

README

        

# Github Webhook Server

package `gws` provides a `http.Server` implementation that handles webhook events from GitHub.

# Usage

```go
s := gws.New("")

go func() {
for {
select {
case event := <-s.PushEvents:
fmt.Println("Received Push", event)
case event := <-s.IssueEvents:
fmt.Println("Received Issue", event)
case event := <-s.IssueCommentEvents:
fmt.Println("Received Issue Comment", event)
case event := <-s.PullRequestEvents:
fmt.Println("Received PR", event)
case event := <-s.OtherEvents:
fmt.Println("Received event", event)
}
}
}()

log.Fatal(http.ListenAndServe(":8080", s))
```